FROM SERVER: :myles7897!n=myles789@cpe-67-49-115-139.socal.res.rr.com PRIVMSG ##swear :ACTION thought he/she was going to kick me again.
command: ctcp, source: myles7897!n=myles789@cpe-67-49-115-139.socal.res.rr.com, target: ##swear, arguments: ['ACTION', 'thought he/she was going to kick me again.']
TO SERVER: PRIVMSG ChanServ :OP ##swear
TO SERVER: KICK ##swear n=myles789@cpe-67-49-115-139.socal.res.rr.com :Please, don't - this won't work
TO SERVER: MODE ##swear -o salrave
FROM SERVER: :ChanServ!ChanServ@services. MODE ##swear +o salrave
command: mode, source: ChanServ!ChanServ@services., target: ##swear, arguments: ['+o', 'salrave']
FROM SERVER: :heinlein.freenode.net 401 salrave n=myles789@cpe-67-49-115-139.socal.res.rr.com :No such nick/channel
command: nosuchnick, source: heinlein.freenode.net, target: salrave, arguments: ['n=myles789@cpe-67-49-115-139.socal.res.rr.com', 'No such nick/channel']
FROM SERVER: :salrave!n=salrave@unaffiliated/salrave MODE ##swear -o salrave
command: mode, source: salrave!n=salrave@unaffiliated/salrave, target: ##swear, arguments: ['-o', 'salrave']
Note that the nickname doesn't match the name provided at the username, thus resulting in the script being unable to kick that specific user.
Here is the function trigger for the action:
def ctcp(server, event):
if event.arguments() [0] == "ACTION":
channel = event.target()
source = event.source().split("!") [1]
server.privmsg("ChanServ", "OP %s" % channel)
server.kick(channel, source, "Please, don't - this won't work")
server.mode(channel, "-o %s" % nickname)
Sorry - wrong project.