19 lines
411 B
Plaintext
19 lines
411 B
Plaintext
|
irce = require "irce"
|
||
|
util = require "irce.util"
|
||
|
|
||
|
{
|
||
|
init: (state) =>
|
||
|
state.nick = ""
|
||
|
|
||
|
senders:
|
||
|
["OPER"]: (state, nick, pass) =>
|
||
|
state.nick = nick
|
||
|
return string.format "OPER %s %s", nick, pass
|
||
|
|
||
|
handlers:
|
||
|
["381"]: (state, sender, params) =>
|
||
|
print string.format "granted ircop status by %s as oper %s", sender[1], state.nick
|
||
|
state.nick = nil
|
||
|
return sender, params
|
||
|
}
|