It pretty much always returned an empty string (or rather: whatever was in the
return variable before, which is an empty string in 99% of cases).
Signed-off-by: Uli Schlachter <psychon@znc.in>
Depending on which of its arguments where NULL, that macro called network / user
modules or not. While this is nice in that it avoids crashes, this behavior
actually surprised me and I'd rather have the caller explicitly say what it
wanted to do.
This macro is replaced with explicit calls to {GLOBAL,USER,NETWORKMODULECALL}.
Since there are actually module calls which do provide a CClient*, but may
happen before login (OnUnknownUserRaw() and the 3 CAP hooks), those are changed
to get the client pointer as their first argument. This should make it more
obvious that these module calls are special.
This commit should make it easier to catch bugs like the recent
OnClientDisconnected() with m_pUser == NULL.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The OnIRCDisconnected module call would cause a segmentation fault
because it would try m_pNetwork->GetModules().GetNetwork(). GetModules()
would return NULL.
Instead, these functions are now inlined into their only caller. This should
make the user and network destruction a little saner. At least I hope so...
Signed-off-by: Uli Schlachter <psychon@znc.in>
This allows a user to have multiple networks.
A user can login as a network by supplying PASS [user[/network]:]pass or
USER user[/network] on connect. A user can also switch between networks
by using /msg *status JumpNetwork <network>