If newcomer joins, create a newcomer object with a datetime field.
If a non-newcomer speaks into the channel, silently record nickname and delete newcomer object.
Regularly check how long the newcomer has been around.
Once the newcomer has been around for longer than a set time (default is 60 seconds) greet them.
aka a learning experience
How do you listen and respond at the same time?
import queue, threading
q = Queue.LifoQueue()
ircmsg = ircsock.recv(2048) # receive data from the server
ircmsg = ircmsg.strip('\n\r') # removing any unnecessary linebreaks.
t = Thread(target=getIRC)
t.daemon = True
ready_to_read, b, c = select.select([ircsock],,, 1)
Learning experience for everyone
12 contributors, including 6 who are making their first open source contribution!
Saves known nicknames
Recognizes patterns of nicknames, eg "shauna__" as "shauna"