summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2011-11-18 13:45:09 +0100
committerJoel Rosdahl <joel@rosdahl.net>2011-11-21 22:18:03 +0100
commitfc734e8d9f9280f0416f6677befd6b7289e21586 (patch)
tree1d6ce5f5693ecc8974547eab52df755d16e7dca4 /miniircd
parent451c1e088c22a4c16dab346b126d2cf69aa7b38f (diff)
downloadminiircd-fc734e8d9f9280f0416f6677befd6b7289e21586.tar.gz
miniircd-fc734e8d9f9280f0416f6677befd6b7289e21586.zip
Add support for WALLOPS
Diffstat (limited to 'miniircd')
-rwxr-xr-xminiircd9
1 files changed, 9 insertions, 0 deletions
diff --git a/miniircd b/miniircd
index d2ddc83..9baa6da 100755
--- a/miniircd
+++ b/miniircd
@@ -405,6 +405,14 @@ class Client(object):
else:
self.reply("442 %s :You're not on that channel" % channelname)
+ def wallops_handler():
+ if len(arguments) < 1:
+ self.reply_461(command)
+ message = arguments[0]
+ for client in server.clients.values():
+ client.message(":%s NOTICE %s :Global notice: %s"
+ % (self.prefix, client.nickname, message))
+
def who_handler():
if len(arguments) < 1:
return
@@ -454,6 +462,7 @@ class Client(object):
"PRIVMSG": notice_and_privmsg_handler,
"QUIT": quit_handler,
"TOPIC": topic_handler,
+ "WALLOPS": wallops_handler,
"WHO": who_handler,
"WHOIS": whois_handler,
}