The ircmsgs object has convenience methods to create irc message objects. To access it:
import supybot.ircmsgs as ircmsgs
ircmsgs.privmsg(channel, text)
Create an irc PRIVMSG message. channel is the channel you want to send the message to. text is the text you want to send. The resulting object is useful for passing to irc.queueMsg(), for example.
Example:
irc.queueMsg(ircmsgs.privmsg(channel, text)) irc.noReply()
See also: irc.queueMsg(), irc.noReply()
ircmsgs.action(channel, text)
Create an irc PRIVMSG ACTION message. channel is the channel you want to send the message to. text is the text you want to send. The resulting object is useful for passing to irc.queueMsg(), for example.
Example:
irc.queueMsg(ircmsgs.action(channel, text)) irc.noReply()
See also: irc.queueMsg(), irc.noReply()
ircmsgs.op(channel, nick)
Create an IRC message suitable for giving ops to someone (mode +o). Channel is the channel you want to send the message to. nick is the nick to receive the ops. The resulting object is useful for passing to irc.queueMsg(), for example.
Example:
irc.queueMsg(ircmsgs.op(channel, nick)) irc.noReply()
See also: irc.queueMsg(), irc.noReply()
ircmsgs.deop(channel, nick)
Create an IRC message suitable for taking ops from someone (mode -o). Channel is the channel you want to send the message to. nick is the nick to remove the ops from. The resulting object is useful for passing to irc.queueMsg(), for example.
Example:
irc.queueMsg(ircmsgs.deop(channel, nick)) irc.noReply()
See also: irc.queueMsg(), irc.noReply()
ircmsgs.halfop(channel, nick)
Create an IRC message suitable for giving halfops to someone (mode +h). Channel is the channel you want to send the message to. nick is the nick to receive the halfops. The resulting object is useful for passing to irc.queueMsg(), for example.
Example:
irc.queueMsg(ircmsgs.halfop(channel, nick)) irc.noReply()
See also: irc.queueMsg(), irc.noReply()
ircmsgs.dehalfop(channel, nick)
Create an IRC message suitable for removing halfops from someone (mode -h). Channel is the channel you want to send the message to. nick is the nick to remove the halfops from. The resulting object is useful for passing to irc.queueMsg(), for example.
Example:
irc.queueMsg(ircmsgs.dehalfop(channel, nick)) irc.noReply()
See also: irc.queueMsg(), irc.noReply()
ircmsgs.voice(channel, nick)
Create an IRC message suitable for giving voice to someone (mode +v). Channel is the channel you want to send the message to. nick is the nick to receive voice. The resulting object is useful for passing to irc.queueMsg(), for example.
Example:
irc.queueMsg(ircmsgs.voice(channel, nick)) irc.noReply()
See also: irc.queueMsg(), irc.noReply()
ircmsgs.devoice(channel, nick)
Create an IRC message suitable for removing voice from someone (mode -v). Channel is the channel you want to send the message to. nick is the nick to remove the voice from. The resulting object is useful for passing to irc.queueMsg(), for example.
Example:
irc.queueMsg(ircmsgs.devoice(channel, nick)) irc.noReply()
See also: irc.queueMsg(), irc.noReply()
ircmsgs.kick(channel, nick, message)
Create an IRC message suitable for kicking someone from a channel. Channel is the channel from which you want to kick the person. nick is the nick to be kicked. message is the kick message to send. The resulting object is useful for passing to irc.queueMsg(), for example.
Example:
irc.queueMsg(ircmsgs.kick(channel, nick, message)) irc.noReply()
See also: irc.queueMsg(), irc.noReply()
Wiki: Irc_object
Wiki: Plugin_testing
Wiki: Supybot_Resources