Menu

Ircmsgs_object

nanotube quantumlemur

The ircmsgs object has convenience methods to create irc message objects. To access it:

import supybot.ircmsgs as ircmsgs

ircmsgs.privmsg()

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()

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()

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()

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()

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()

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()

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()

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()

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()


Related

Wiki: Irc_object
Wiki: Plugin_testing
Wiki: Supybot_Resources