summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2017-12-03 22:04:32 +1030
committerdaniel-Jones <daniel@danieljon.es>2017-12-03 22:04:32 +1030
commit4e97eb5f2e4cfa70a87c9ee6f3b63d4541bc05a9 (patch)
tree5fa16cadd42a09d7540b750c2bdfc8e4800f08e3 /miniircd
parent7b5341ae68522bf812ca2829c501a64981e2f80b (diff)
downloadminiircd-4e97eb5f2e4cfa70a87c9ee6f3b63d4541bc05a9.tar.gz
miniircd-4e97eb5f2e4cfa70a87c9ee6f3b63d4541bc05a9.zip
removed kick test function, added ip restriction to /wallops
Diffstat (limited to 'miniircd')
-rwxr-xr-xminiircd31
1 files changed, 11 insertions, 20 deletions
diff --git a/miniircd b/miniircd
index f2e5694..6121632 100755
--- a/miniircd
+++ b/miniircd
@@ -510,14 +510,18 @@ class Client(object):
else:
self.reply("442 %s :You're not on that channel" % channelname)
+
+ iplist = {'127.0.0.1'}
+
def wallops_handler():
- if len(arguments) < 1:
- self.reply_461("WALLOPS")
- return
- message = arguments[0]
- for client in server.clients.values():
- client.message(":%s NOTICE %s :Global notice: %s"
- % (self.prefix, client.nickname, message))
+ if self.host in iplist:
+ if len(arguments) < 1:
+ self.reply_461("WALLOPS")
+ return
+ 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:
@@ -554,7 +558,6 @@ class Client(object):
self.reply("401 %s %s :No such nick"
% (self.nickname, username))
- iplist = '127.0.0.1'
def kill_handler():
if len(arguments) < 1:
return
@@ -568,17 +571,6 @@ class Client(object):
quitmsg = arguments[1]
user.disconnect("killed: " + quitmsg)
- def kick_handler():
- if len(arguments) < 2:
- return
- username = arguments[0]
- channel = arguments[1]
- user = server.get_client(username)
- if user and channel in user.channels and self.host in iplist:
- kickmsg = "%s was kicked from %s by %s" % (user.nickname, channel, self.nickname)
- print("kick requested of '%s@%s'" % (user.nickname, user.host))
- server.remove_member_from_channel(user, channel)
-
handler_table = {
"AWAY": away_handler,
"ISON": ison_handler,
@@ -600,7 +592,6 @@ class Client(object):
"WHO": who_handler,
"WHOIS": whois_handler,
"KILL": kill_handler,
- #"KICK": kick_handler,
}
server = self.server
valid_channel_re = self.__valid_channelname_regexp