jaraco / irc

Full-featured Python IRC library for Python.
MIT License
392 stars 86 forks source link

Question about events #44

Closed jaraco closed 8 years ago

jaraco commented 8 years ago

Is there an event (or a function that gets called) that gets triggered on both public and private message? something like on_msg() maybe?


jaraco commented 8 years ago

Realised that I can just add global handlers for both events to a single function


Original comment by: Lizzy Trickster

jaraco commented 8 years ago

I don't believe there is. Instead, a method is called if it matches the specific message type. I imagine a client could easily alias a single method with two names. I.e. on_privmsg = on_pubmsg or similar.


Original comment by: Jason R. Coombs

jaraco commented 8 years ago

Hah. Just saw your second message. Glad you found a solution.


Original comment by: Jason R. Coombs