Mercurial > cabal
diff sources/connection.cpp @ 6:9be05a31b7f9
Enqlave IRC Network => Vaygr IRC Network
-Os optimizations by default
temporary functions' arguments rename
*char => NULL
bool => true|false
renamed some global vars, removed debug info
| author | Vlad Glagolev <enqlave@gmail.com> |
|---|---|
| date | Sun, 27 Jan 2008 17:23:14 +0300 |
| parents | 0faceb076254 |
| children | 8d54d9fdeca3 |
line wrap: on
line diff
--- a/sources/connection.cpp Thu Jan 24 21:00:52 2008 +0300 +++ b/sources/connection.cpp Sun Jan 27 17:23:14 2008 +0300 @@ -19,7 +19,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "cabal.hpp" // required: core.h +#include "cabal.hpp" // required: core.hpp Connection::Connection(): nick(NICK), @@ -28,7 +28,7 @@ chan(CHANNEL), key(CHANNEL_KEY) { - hosts = current = 0; + hosts = current = NULL; now = CABAL->now; @@ -96,41 +96,41 @@ } } -void Connection::ircPass(string pass) +void Connection::ircPass(string p) { - sendMsg("PASS " + pass); + sendMsg("PASS " + p); } -void Connection::ircNick(string nnick) +void Connection::ircNick(string n) { - sendMsg("NICK " + (nnick != "" ? nnick : NICK)); + sendMsg("NICK " + (n != "" ? n: NICK)); } -void Connection::ircUser(string nuser, string nname) +void Connection::ircUser(string u, string n) { - sendMsg("USER " + nuser + (virtualhost != 0 ? " " + (string)virtualhost + \ - " " : " 0 ") + (string)current->host + " :" + nname); + sendMsg("USER " + u + (virtualhost ? " " + (string)virtualhost + " ": \ + " 0 ") + (string)current->host + " :" + n); } -void Connection::ircAway(string away) +void Connection::ircAway(string m) { - sendMsg("AWAY :" + away); + sendMsg("AWAY :" + m); } -void Connection::ircJoin(string chan, string key) +void Connection::ircJoin(string c, string k) { - sendMsg("JOIN " + chan + (key != "" ? " " + key : "")); + sendMsg("JOIN " + c + (k != "" ? " " + k: "")); } -void Connection::ircPart(string chan) +void Connection::ircPart(string c) { - sendMsg("PART " + chan); + sendMsg("PART " + c); } -void Connection::ircCycle(string chan) +void Connection::ircCycle(string c) { - sendMsg("PART " + chan); - sendMsg("JOIN " + chan); + sendMsg("PART " + c); + sendMsg("JOIN " + c); } Connection::host_type *Connection::addHost(host_type *list, pchar host, \
