Class | Irc::User |
In: |
lib/rbot/botuser.rb
lib/rbot/irc.rb |
Parent: | Object |
An IRC User is identified by his/her Netmask (which must not have globs). In fact, User is just a subclass of Netmask.
Ideally, the user and host information of an IRC User should never change, and it shouldn‘t contain glob patterns. However, IRC is somewhat idiosincratic and it may be possible to know the nick of a User much before its user and host are known. Moreover, some networks (namely Freenode) may change the hostname of a User when (s)he identifies with Nickserv.
As a consequence, we must allow changes to a User host and user attributes. We impose a restriction, though: they may not contain glob patterns, except for the special case of an unknown user/host which is represented by a *.
It is possible to create a totally unknown User (e.g. for initializations) by setting the nick to * too.
TODO list:
nick | -> | to_s |
idle_since | [RW] | |
real_name | [RW] | |
signon | [RW] |
Since to_irc_user runs the same checks on server and channel as to_irc_netmask, we just try that and return self if it works.
Subclasses of User will return self if possible.