Fixes #1020
When the user connects to a bouncer, the bouncer will send back the
welcome message received when it first connected to the network.
This caused Quassel to display a wrong nick if it had changed
since the first connection.
-void CoreSessionEventProcessor::processIrcEvent001(IrcEvent *e)
+void CoreSessionEventProcessor::processIrcEvent001(IrcEventNumeric *e)
- if (!checkParamCount(e, 1))
- return;
-
- QString myhostmask = e->params().at(0).section(' ', -1, -1);
e->network()->setCurrentServer(e->prefix());
e->network()->setCurrentServer(e->prefix());
- e->network()->setMyNick(nickFromMask(myhostmask));
+ e->network()->setMyNick(e->target());
Q_INVOKABLE void processKeyEvent(KeyEvent *event);
#endif
Q_INVOKABLE void processKeyEvent(KeyEvent *event);
#endif
- Q_INVOKABLE void processIrcEvent001(IrcEvent *event); // RPL_WELCOME
+ Q_INVOKABLE void processIrcEvent001(IrcEventNumeric *event); // RPL_WELCOME
Q_INVOKABLE void processIrcEvent005(IrcEvent *event); // RPL_ISUPPORT
Q_INVOKABLE void processIrcEvent221(IrcEvent *event); // RPL_UMODEIS
Q_INVOKABLE void processIrcEvent250(IrcEvent *event); // RPL_STATSCONN
Q_INVOKABLE void processIrcEvent005(IrcEvent *event); // RPL_ISUPPORT
Q_INVOKABLE void processIrcEvent221(IrcEvent *event); // RPL_UMODEIS
Q_INVOKABLE void processIrcEvent250(IrcEvent *event); // RPL_STATSCONN