From 6b1e9c01b17801a80d3829c4d6341170b5f8a5c2 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 23 Feb 2013 16:34:37 +0000 Subject: [PATCH] Glob2Chan: Update welcome message to display number of users on IRC. --- Glob2Chan/plugin.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Glob2Chan/plugin.py b/Glob2Chan/plugin.py index cc443ad..20664a6 100644 --- a/Glob2Chan/plugin.py +++ b/Glob2Chan/plugin.py @@ -93,11 +93,11 @@ class Glob2Chan(callbacks.Plugin): self._users.update({msg.nick: msg.prefix.split('@')[1]}) if nick.startswith('[YOG]') and \ nick not in self.registryValue('nowelcome').split(' '): - irc.queueMsg(ircmsgs.privmsg(nick, 'Hi %s, welcome to the ' - 'globulation online game room. Those monitoring this room ' - 'via IRC may awaken and challenge you to a game, if you type ' - 'their name as given in the room participant window.' % - nick)) + irc.queueMsg(ircmsgs.privmsg(nick, ('Hi %s, welcome to the ' + 'globulation online game room. There are currently %i ' + 'people connected via IRC, they may awaken and challenge ' + 'you to a game.') % + (nick, len(irc.state.channels[channel].users)))) if nick.startswith('[YOG]'): irc.queueMsg(ircmsgs.IrcMsg(s='WHOIS %s' % nick))