diff options
author | Florian Jung <flo@thinkpad.(none)> | 2011-02-28 18:48:58 +0100 |
---|---|---|
committer | Florian Jung <flo@thinkpad.(none)> | 2011-02-28 18:48:58 +0100 |
commit | 74377ece178e661194a40fa79238b3089bb0d0f2 (patch) | |
tree | a1313c5518c5304b90396ef6ed3c04088e8fefe0 /TConnection.cpp | |
parent | d26ab5f2338aaf07289dd57c7770f85a79cf7b2b (diff) |
Cleaned up unneeded files, some bugfixes
ismaster/isuser now gets called with origin_raw
Diffstat (limited to 'TConnection.cpp')
-rw-r--r-- | TConnection.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/TConnection.cpp b/TConnection.cpp index e73b088..eb1271b 100644 --- a/TConnection.cpp +++ b/TConnection.cpp @@ -652,6 +652,12 @@ void TConnection::deluser(string nick) bool TConnection::isuser(string nick) { + if (nick.find('!')==string::npos) + { + cout << "WARNING: called isuser() with stripped nick instead of raw_nick. returning false" << endl; + return false; + } + if ((users_li.isinlist(cut_nick(nick))) && (users_li.get_info(cut_nick(nick))!=nick)) //still logged in, but wrong hostmask? { cout << "removing '"<<cut_nick(nick)<<"' from list of logged in users due to a hostmask mismatch" << endl; @@ -673,6 +679,12 @@ void TConnection::delmaster(string nick) bool TConnection::ismaster(string nick) { + if (nick.find('!')==string::npos) + { + cout << "WARNING: called ismaster() with stripped nick instead of raw_nick. returning false" << endl; + return false; + } + if ((masters_li.isinlist(cut_nick(nick))) && (masters_li.get_info(cut_nick(nick))!=nick)) //still logged in, but wrong hostmask? { cout << "removing '"<<cut_nick(nick)<<"' from list of logged in masters due to a hostmask mismatch" << endl; |