chiark
/
gitweb
/
~matthewv
/
irc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new trout from rjk
[irc.git]
/
Servus-chiark.py
diff --git
a/Servus-chiark.py
b/Servus-chiark.py
index 37cccf93d35915a55171008ae67183096a55bbae..9c381aea2accca3c587f32548d489fd6c86bf4ab 100644
(file)
--- a/
Servus-chiark.py
+++ b/
Servus-chiark.py
@@
-24,7
+24,7
@@
# Acrobat configuration file
# The following definitions are required to be present in this module:
# Acrobat configuration file
# The following definitions are required to be present in this module:
-server = "
rapun
"
+server = "
chiark
"
port = 6667
nickname = "Servus"
channel = "#chiark"
port = 6667
nickname = "Servus"
channel = "#chiark"
@@
-168,7
+168,7
@@
commands = {"karma": (c.karmaq,karmadb),
"die": quit,
"define": c.defineq,
"google": c.googleq,
"die": quit,
"define": c.defineq,
"google": c.googleq,
-
#
"url": (c.urlq,urldb),
+
"url": (c.urlq,urldb),
"units": c.unitq,
"help": c.helpq,
# "game": (c.gameq,game),
"units": c.unitq,
"help": c.helpq,
# "game": (c.gameq,game),
@@
-183,6
+183,7
@@
triggers = ("!", "~") # what character should the bot be invoked by:
# eg !trout, ~trout etc.
def command(bot, cmd, nick, conn, public):
# eg !trout, ~trout etc.
def command(bot, cmd, nick, conn, public):
+ global urldb,lastexp,expirelen,expirevery
ours=0
try:
if public and cmd[0] in triggers:
ours=0
try:
if public and cmd[0] in triggers:
@@
-199,10
+200,10
@@
def command(bot, cmd, nick, conn, public):
c.urlexpire(urldb,expirelen)
lastexp=t
c.urlexpire(urldb,expirelen)
lastexp=t
-
#
if public:
-
# if c.urlre.search(cmd)
:
-
#
c.dourl(bot,conn,nick,cmd,urldb)
-
+ if public:
+
if c.urlre.search(cmd) and command.lower()!="url"
:
+ c.dourl(bot,conn,nick,cmd,urldb)
+
# karma: up
if command.endswith("++"):
karma(cmd,1)
# karma: up
if command.endswith("++"):
karma(cmd,1)