-def urlq(bot, cmd, nick, conn, public):
- if (not urlre.search(cmd)):
- bot.automsg(False,nick,"Please use 'url' only with http URLs")
- return
-
- url="".join(cmd.split(" ")[1:])
-
- url=canonical_url(url)
- if (url in urldb):
- users = urldb[url]
- complaint="The url %s was mentioned %s by %s"%(url,nicetime(time.time()-users[-1][1]),users[-1][0])
- if (public):
- complaint=complaint+". Furthermore it defeats the point of this command to use it other than via /msg."
- bot.automsg(False,nick,complaint)
- else:
- if (public):
- bot.automsg(False,nick,"That URL was unique. There is little point in using !url out loud; please use it via /msg")
- else:
- conn.privmsg(bot.channel,"%s would like to draw your attention to %s"%(nick,url))
- urldb[url]=[[nick,time.time()]]
+#path where Oauth details are kept
+twioauthpath=os.path.expanduser("~/private/servus_twapi_oauth.txt")