Skip to content
wolfy1339 edited this page Apr 20, 2017 · 4 revisions

zIRC Events parse IRC raw messages, the event class has the following attributes:

type: PRIVMSG
text_type: PRIVMSG
source: BWBellairs!~bwbellair@botters/BWBellairs
target: #ezzybot
arguments: ['Andromeda > potatoes > moo > life']
tags: []
raw: :BWBellairs!~bwbellair@botters/BWBellairs PRIVMSG #ezzybot :Andromeda > potatoes > moo > life

These can be accessed by doing event.type for example.

Source parsing

Source is automatically parsed to make it easier for users to grab the nick, user (ident) or host.

>>> event.source.nick
u'eclipse'
>>> event.source.user
u'watching'
>>> event.source.host
u'zirc/dev/zz'

Event types supported

zIRC supports many event types, you can check out all the numeric events in the events.json file.
zIRC also supports many non-numeric events like PRIVMSG, CTCP, BAN, KICK, etc. There is also the ALL event that catches every single event (even numeric events).

Clone this wiki locally