[Chicago] hello all

Jon Sudlow jsudlow at gmail.com
Mon Feb 25 23:33:44 CET 2008


what error does it send back to you?

As a design question, why not loop through the channel joining process in a
while loop. Then you could have some way to verify that you have actually
connected, so it could dump you out of the loop and into the main core of
your bot's functionality.

On Mon, Feb 25, 2008 at 3:04 PM, lostson <lostson at lostsonsvault.org> wrote:

>
>  Hello I am new to this list but saw it in the python website and was
> hoping maybe someone could give me a hand. I have started working with
> python and found a irc bot tutorial and am having problems. here is my code
> so far
>
> ##
> import irclib
> import time
> irclib.DEBUG = True
>
> # Connection information
> network = 'irc.wirednetwork.org'
> port = 6667
> nick = 'lostbot'
> name = 'lostbot'
> channel = '#thevault'
>
> # Create an IRC object
> irc = irclib.IRC()
>
> # Create a server object, connect and join the channel
> server = irc.server()
> server.connect ( network, port, nick, ircname = name )
> server.join ( channel )
>
> # Jump into an infinite loop
> irc.process_forever()
> ##
>
>  This works on every other network but my friends it appears it is trying
> to join the channel to quickly and kicks an error back. It the goes through
> the rest of the way but does not join the channel. I have tried using the
> time.sleep option but this does not work either. So my question is how can
> i make it so it goes through normal process getting to the server the after
> it is connected have it join a channel ? Thanks
>
> < ------ >
> lostson
>
> http://lostsonsvault.org
>
> Create Your Own Desktop - AfterStep - http://www.afterstep.org
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
>


-- 
Jon Sudlow
3225 Foster Avenue
221 Sohlberg Hall
C.P.O 2224
Chicago, Il  60625
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/chicago/attachments/20080225/7e3da8fa/attachment.htm 


More information about the Chicago mailing list