fixed a couple of problems in some modules.
This commit is contained in:
parent
076552c013
commit
426068f0cf
3 changed files with 16 additions and 14 deletions
|
@ -19,8 +19,10 @@ class Module(object):
|
||||||
if match:
|
if match:
|
||||||
if not event["user"].last_karma or (time.time()-event["user"
|
if not event["user"].last_karma or (time.time()-event["user"
|
||||||
].last_karma) >= KARMA_DELAY_SECONDS:
|
].last_karma) >= KARMA_DELAY_SECONDS:
|
||||||
|
target = match.group(1).lower().strip()
|
||||||
|
if not target == event["user"].name:
|
||||||
positive = match.group(2)[0] == "+"
|
positive = match.group(2)[0] == "+"
|
||||||
setting = "karma-%s" % match.group(1).strip()
|
setting = "karma-%s" % target
|
||||||
karma = event["server"].get_setting(setting, 0)
|
karma = event["server"].get_setting(setting, 0)
|
||||||
if positive:
|
if positive:
|
||||||
karma += 1
|
karma += 1
|
||||||
|
|
|
@ -7,7 +7,7 @@ class Module(object):
|
||||||
|
|
||||||
def on_connect(self, event):
|
def on_connect(self, event):
|
||||||
nickserv_password = event["server"].get_setting(
|
nickserv_password = event["server"].get_setting(
|
||||||
"nickserv_password")
|
"nickserv-password")
|
||||||
if nickserv_password:
|
if nickserv_password:
|
||||||
event["server"].send_message("nickserv",
|
event["server"].send_message("nickserv",
|
||||||
"identify %s" % nickserv_password)
|
"identify %s" % nickserv_password)
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Module(object):
|
||||||
if len(event["args"]) > 0:
|
if len(event["args"]) > 0:
|
||||||
url = event["args_split"][0]
|
url = event["args_split"][0]
|
||||||
else:
|
else:
|
||||||
url = event["channel"].log.find(REGEX_URL)
|
url = event["log"].find(REGEX_URL)
|
||||||
if url:
|
if url:
|
||||||
url = re.search(REGEX_URL, url.message).group(0)
|
url = re.search(REGEX_URL, url.message).group(0)
|
||||||
if not url:
|
if not url:
|
||||||
|
|
Loading…
Reference in a new issue