'Log msg.raw, then process incoming msg into appropriate client steps.'
self._log(msg.raw, scope=LogScope.RAW, out=False)
match msg.verb:
- case '001' | '002' | '003' | '004':
+ case '001' | 'NICK':
+ self._update_db('nickname', value=msg.params[0], confirm=True)
+ case '002' | '003' | '004':
pass # explicitly ignored verbs/numerics
case '375':
self._db.set('motd', [], False)
self.send(IrcMessage(verb='PONG', params=(msg.params[0],)))
case 'ERROR':
self.close()
- case '001' | 'NICK':
- self._update_db('nickname', value=msg.params[0], confirm=True)
case 'NOTICE' | 'PRIVMSG':
scope = LogScope.CHAT if '!' in msg.source else LogScope.SERVER
self._log(msg.params[-1], scope=scope, channel=msg.params[0],