The list of DelayedCommands tries to be sorted in _schedule_command() on irclib.py line 321, but it does nothing. This causes process_timeout() to break if the next command doesn't happen to be the first element. DelayedCommand needs cmp() defined for the sort to work.
d = []
bisect.insort(d, irclib.DelayedCommand(20, doit, tuple()))
bisect.insort(d, irclib.DelayedCommand(30, doit, tuple()))
bisect.insort(d, irclib.DelayedCommand(10, doit, tuple()))
bisect.insort(d, irclib.DelayedCommand(5, doit, tuple()))
[x.delay for x in d]
[30, 5, 20, 10]
Thanks for the bug report. This will be fixed in the 0.6 line shortly.
Fixed in fd20aecc62ed.