@@ -0,0 +1,992 @@
+%0Aimport sys%0Aimport logging%0A%0Aimport gevent%0A%0Afrom girc.client import Client%0A%0Ahost = sys.argv%5B1%5D%0Anick = sys.argv%5B2%5D%0A%0Alogging.basicConfig(level=logging.DEBUG)%0A%0Amatch_args = dict(command='PRIVMSG', payload='ordering test')%0Aclient = Client(host, nick)%0A%0Adef reply(client, msg, s):%0A%09for target in msg.targets:%0A%09%09if client.matches_nick(target):%0A%09%09%09target = msg.sender%0A%09%09client.msg(target, s)%0A%0A@client.handler(**match_args)%0Adef A(client, msg):%0A%09reply(client, msg, %22handler A%22)%0A%0A@client.handler(after=A, sync=True, **match_args)%0Adef B(client, msg):%0A%09reply(client, msg, %22handler B, after A, before next message is read%22)%0A%0A@client.handler(before=B, **match_args)%0Adef C(client, msg):%0A%09reply(client, msg, %22handler C, before B%22)%0A%0A@client.handler(after=B, **match_args)%0Adef D(client, msg):%0A%09gevent.sleep(10)%0A%09reply(client, msg, %22handler D, after B, 10s sleep%22)%0A%0A@client.handler(command='PRIVMSG', payload='hello test')%0Adef hello(client, msg):%0A%09reply(client, msg, %22hi!%22)%0A%0Aclient.start()%0Aclient.wait_for_stop()%0A

Add ordering example