From 32556d418d40f6a1b231b011ef27c46f58fc4826 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 6 Sep 2015 22:40:10 -0700 Subject: [PATCH] docs: bring plugin_example.py up to date --- docs/technical/plugin_example.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/technical/plugin_example.py b/docs/technical/plugin_example.py index c166dbe..c00fb0c 100644 --- a/docs/technical/plugin_example.py +++ b/docs/technical/plugin_example.py @@ -26,7 +26,7 @@ def hook_privmsg(irc, source, command, args): # irc.pseudoclient stores the IrcUser object of the main PyLink client. # (i.e. the user defined in the bot: section of the config) if utils.isChannel(channel) and irc.pseudoclient.nick in text: - utils.msg(irc, channel, 'hi there!') + irc.msg(channel, 'hi there!') log.info('%s said my name on channel %s (PRIVMSG hook caught)' % (source, channel)) utils.add_hook(hook_privmsg, 'PRIVMSG') @@ -50,7 +50,7 @@ def randint(irc, source, args): except IndexError: rmin, rmax = 1, 10 n = random.randint(rmin, rmax) - utils.msg(irc, source, str(n)) + irc.msg(source, str(n)) # You can also bind a command function multiple times, and/or to different command names via a # second argument. # Note: no checking is done at the moment to prevent multiple plugins from binding to the same