Re: How to use a variable to act as @rule in a Sopel IRC bot module?

2015-12-22 Thread arresteddevlopment
swer): @rule(answer) def correct(bot, trigger): bot.say(' correctamundo!') If the above comes out wonky again I also asked on StackOverflow (http://stackoverflow.com/questions/34419265/how-to-set-and-later-change-a-rule-in-a-sopel-irc-bot-module-python). Any help would be greatly appreciated. -- https://mail.python.org/mailman/listinfo/python-list

How to use a variable to act as @rule in a Sopel IRC bot module?

2015-12-22 Thread arresteddevlopment
Hi everyone. I'm working with the Sopel (previously Willie and before that, Jenni/Phenny) python IRC bot as I'd like to set up a trivia quiz for our IRC channel. With Sopel, the @rule decorator lets you set a string that the bot will listen out for and which triggers a correspondin

Re: IRC bot

2009-09-13 Thread Someone Something
Thanks a lot! On Sun, Sep 13, 2009 at 4:29 PM, MRAB wrote: > Someone Something wrote: > >> I"m trying to write an IRC bot just for fun (in python of course). Here's >> my current code: >> >> 1 #!/usr/local/bin/python >> 2 import time >> 3

Re: IRC bot

2009-09-13 Thread MRAB
Someone Something wrote: I"m trying to write an IRC bot just for fun (in python of course). Here's my current code: 1 #!/usr/local/bin/python 2 import time 3 import socket 4 5 def message (x, channel,s): 6 y="PRIVMSG"+" "+ channel+&quo

Re: IRC bot

2009-09-13 Thread Someone Something
Anyone? On Sun, Sep 13, 2009 at 3:58 PM, Someone Something wrote: > I"m trying to write an IRC bot just for fun (in python of course). Here's > my current code: > > 1 #!/usr/local/bin/python > 2 import time > 3 import socket > 4 > 5 def message (x

IRC bot

2009-09-13 Thread Someone Something
I"m trying to write an IRC bot just for fun (in python of course). Here's my current code: 1 #!/usr/local/bin/python 2 import time 3 import socket 4 5 def message (x, channel,s): 6 y="PRIVMSG"+" "+ channel+" :"+x 7 s.send(y); 8 hos

IRC bot threading dilemma

2008-01-18 Thread bakermi
Hello, I have coded an IRC bot in Python. Each inbound packet is parsed, and once the bot decides whether it is a command directed at the bot or not, it will either discard the packet or make a function call to an access control checker function. If the invoking user is found to have sufficient

Re: Python IRC bot using Twisted

2007-07-11 Thread Jean-Paul Calderone
On Wed, 11 Jul 2007 03:51:27 -0700, ddtm <[EMAIL PROTECTED]> wrote: >I have another problem with my IRC bot. There is privmsg(self, user, >channel, msg) function (this function handles the incoming IRC data) >in the code that was mentioned above. I have a special condition in >

Re: Python IRC bot using Twisted

2007-07-11 Thread ddtm
I have another problem with my IRC bot. There is privmsg(self, user, channel, msg) function (this function handles the incoming IRC data) in the code that was mentioned above. I have a special condition in this function that if a user sends to bot a private message (in other words: if channel

Re: Python IRC bot using Twisted

2007-07-04 Thread ddtm
On 3, 20:08, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 03 Jul 2007 15:51:30 -, ddtm <[EMAIL PROTECTED]> wrote: > >On 3, 17:55, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > >> On Tue, 03 Jul 2007 13:44:34 -, ddtm <[EMAIL PROTECTED]> wrote: > >> >On 3, 16:01, Je

Re: Python IRC bot using Twisted

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 15:51:30 -, ddtm <[EMAIL PROTECTED]> wrote: >On 3, 17:55, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> On Tue, 03 Jul 2007 13:44:34 -, ddtm <[EMAIL PROTECTED]> wrote: >> >On 3, 16:01, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> > [snip] >> >> >Thank yo

Re: Python IRC bot using Twisted

2007-07-03 Thread ddtm
On 3, 17:55, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 03 Jul 2007 13:44:34 -, ddtm <[EMAIL PROTECTED]> wrote: > >On 3, 16:01, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > [snip] > > >Thank you very much! It's a very useful information. One more > >question: can I c

Re: Python IRC bot using Twisted

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 13:44:34 -, ddtm <[EMAIL PROTECTED]> wrote: >On 3, 16:01, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > [snip] > >Thank you very much! It's a very useful information. One more >question: can I cancel the DelayedCall using its ID (it is returned >from callLater(...)) f

Re: Python IRC bot using Twisted

2007-07-03 Thread ddtm
On 3, 16:01, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 03 Jul 2007 09:46:59 -, ddtm <[EMAIL PROTECTED]> wrote: > >I'm using an example of IRC bot (_ttp://twistedmatrix.com/projects/ > >words/documentation/examples/ircLogBot.py) to create my

Re: Python IRC bot using Twisted

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 09:46:59 -, ddtm <[EMAIL PROTECTED]> wrote: >I'm using an example of IRC bot (_ttp://twistedmatrix.com/projects/ >words/documentation/examples/ircLogBot.py) to create my own bot. But I >have a problem. I'm trying to make my bot send messages period

Python IRC bot using Twisted

2007-07-03 Thread ddtm
I'm using an example of IRC bot (_ttp://twistedmatrix.com/projects/ words/documentation/examples/ircLogBot.py) to create my own bot. But I have a problem. I'm trying to make my bot send messages periodically. But I can't find a way of adding Timer or something similar to my code s

IRC Bot trouble..

2006-02-23 Thread yawgmoth7
I'm currently writing a IRC bot for fun...here is the code that I have writen so far: import sys import socket import string import time HOST="irc.freenode.net" PORT=6667 NICK="PapaJorgio_" IDENT="Papa" REALNAME="Jorgio" CHANNEL = &