Mercurial > prosody-modules
comparison mod_ircd/mod_ircd.in.lua @ 499:30e33292d738
mod_ircd: "finish" previous commit.
| author | Marco Cirillo <maranda@lightwitch.org> |
|---|---|
| date | Mon, 05 Dec 2011 21:34:59 +0000 |
| parents | 2865eaf43c74 |
| children | db32236d7682 |
comparison
equal
deleted
inserted
replaced
| 498:2865eaf43c74 | 499:30e33292d738 |
|---|---|
| 308 | 308 |
| 309 -- Some choppy clients send in NICK before USER, that needs to be handled | 309 -- Some choppy clients send in NICK before USER, that needs to be handled |
| 310 if session.username then | 310 if session.username then |
| 311 set_t_data(session, jid.join(session.username, component_jid, "ircd")); | 311 set_t_data(session, jid.join(session.username, component_jid, "ircd")); |
| 312 end | 312 end |
| 313 | 313 |
| 314 if session.username and session.nick then -- send MOTD | 314 send_motd(session); |
| 315 send_motd(session); | |
| 316 end | |
| 317 end | 315 end |
| 318 | 316 |
| 319 function commands.USER(session, params) | 317 function commands.USER(session, params) |
| 320 local username = params[1]; | 318 local username = params[1]; |
| 321 | 319 |
| 331 end | 329 end |
| 332 else | 330 else |
| 333 return session.send{from=muc_server, "462", "USER", "You may not re-register."} | 331 return session.send{from=muc_server, "462", "USER", "You may not re-register."} |
| 334 end | 332 end |
| 335 | 333 |
| 336 if session.username and session.nick then -- send MOTD | 334 send_motd(session); |
| 337 send_motd(session); | |
| 338 end | |
| 339 end | 335 end |
| 340 | 336 |
| 341 function commands.USERHOST(session, params) -- can show only users on the gateway. Needed for some clients to determinate self hostmask. | 337 function commands.USERHOST(session, params) -- can show only users on the gateway. Needed for some clients to determinate self hostmask. |
| 342 local nick = params[1]; | 338 local nick = params[1]; |
| 343 | 339 |
