Source code for zot.plugs.irc

# zot/plugs/irc.py
#
#

""" irc command. """

## IMPORTS

from zot.runtime import kernel, fleet

## irc.join command

[docs]def irc_join(event): if not event.args: return channel = event.args[0] for bot in fleet: if "join" not in bot: continue bot.join(channel) event.reply("join %s (%s)" % (channel, bot.server))
kernel.register("irc.join", irc_join) ## irc.part command
[docs]def irc_part(event): if not event.args: return for bot in fleet: if "part" not in bot: continue bot.part(event.args[0]) event.reply("part %s (%s)" % (channel, bot.server))
kernel.register("irc.part", irc_part) ## irc.nick command
[docs]def irc_nick(event): if not event.args: return for bot in fleet: if "nick" not in bot: continue bot.nick(event.args[0]) event.reply("nick %s" % bot.server)
kernel.register("irc.nick", irc_nick) ## irc.quit command
[docs]def irc_quit(event): if not event.args: return for bot in fleet: if "quit" not in bot: continue bot.quit(event.rest()) event.reply("quit %s" % bot.server)
kernel.register("irc.quit", irc_quit)