Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Updated autoop for new hostmask filter. Part of #10
Browse files Browse the repository at this point in the history
  • Loading branch information
izzy committed Mar 25, 2014
1 parent 221c15e commit 85fab44
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions plugins/autoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@
from bytebot_config import BYTEBOT_PLUGIN_CONFIG

class autoop(Plugin):
def onUserJoined(self, irc, user, channel):
if user in BYTEBOT_PLUGIN_CONFIG['autoop'][channel]:
def onIrc_JOIN(self, irc, prefix, params):
channel = params[0]
user = prefix.split('!')[0]

if prefix in BYTEBOT_PLUGIN_CONFIG['autoop']['hostmask'][channel]:
print("Giving user %s +o on channel %s" % (prefix, channel))
irc.mode(channel, True, 'o', user=user)
irc.msg(channel, "Hey, %s, it seems like you're a nice guy. Let me op you hard" % user)
if user in BYTEBOT_PLUGIN_CONFIG['autoop']['name'][channel]:
print("Giving user %s +o on channel %s" % (user, channel))
irc.mode(channel, True, 'o', user=user)
irc.msg(channel, "Hey, %s, it seems like you're a nice guy. Let me op you hard" % user)
else:
print("User %s not in autoop list %s" % (user, channel))
print("User %s not in autoop list %s" % (prefix, channel))

0 comments on commit 85fab44

Please sign in to comment.