From e57383a387729e496591aa878fc13ab1f9426461 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sat, 16 Feb 2013 16:48:22 +0100 Subject: JOIN gefixt --- TChannel.cpp | 4 ++-- TConnection.cpp | 2 +- TODO | 14 ++++++++++++++ etc/drunkenman.conf | 5 +++-- plugins/postconnect.cpp | 2 +- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/TChannel.cpp b/TChannel.cpp index a242605..d041e0a 100644 --- a/TChannel.cpp +++ b/TChannel.cpp @@ -70,9 +70,9 @@ void TChannel::interpret_message (ircmessage msg) // show_users(); string temp; - + if ( ucase(msg.command)=="JOIN" ) - if (ucase(msg.content)==ucase(name)) + if (ucase(msg.params)==ucase(name)) { msg_for_us=true; users.addtolist(msg.origin); diff --git a/TConnection.cpp b/TConnection.cpp index eb1271b..42fdf13 100644 --- a/TConnection.cpp +++ b/TConnection.cpp @@ -511,7 +511,7 @@ void TConnection::interpret_message(ircmessage msg) //ggf. neue sessions öffnen if (ucase(msg.command)=="JOIN") if (ucase(msg.origin)==ucase(nick)) - chans.push_back(new TChannel(msg.content,this)); + chans.push_back(new TChannel(msg.params,this)); if (ucase(msg.command)=="PART") if (ucase(msg.origin)==ucase(nick)) diff --git a/TODO b/TODO index d726a04..2504ef3 100644 --- a/TODO +++ b/TODO @@ -28,4 +28,18 @@ plugins können folgendes tun: if (parent->do("timedkick"...)<0) parent->do("normalkick") + + ODER: + plugins stellen hook(string what, void* data, TConnection* parent) + bereit, und sagen in init, was sie können (kann auch "nichts" sein) + wenn nun ein plugin als "KICK" eingetragen ist, wird statt + dm's eigenem kick dieser hook gerufen, mit allen infos über den + momentanen verbindungskontext. + -> plugins können auch später noch darauf reagieren + + außerdem können hooks "antworten". dafür wird ein weiterer + exe-grund erstellt, nämlich REASON_ANSWER. den können plugins + nicht ignorieren. + so kann z.B. "is_master" erst einen whois starten, und erst dann + antworten, wenn der whois durch ist. diff --git a/etc/drunkenman.conf b/etc/drunkenman.conf index c01aa81..5ba0825 100644 --- a/etc/drunkenman.conf +++ b/etc/drunkenman.conf @@ -6,7 +6,7 @@ rejoin=true #to which servers should be connected on startup connect=irc.freenode.net -freenode.net.join="#DrunkenMan" +freenode.net.join="#lmuse" #freenode.net.nick="TestingMan" #freenode.net.altnicks="TestingMan2 TestingMan3" freenode.net.nick="DrunkenMan" @@ -24,6 +24,7 @@ GID=flo #add plugins you want to be loaded right after startup here: loadplugins=postconnect -loadplugins+=keepnick usertest rejoin +#loadplugins+=keepnick usertest rejoin +loadplugins+=keepnick lmuse-usergreet #loadplugins+=pong #since 2.1.10 DrunkenMan does pinging on his own #... diff --git a/plugins/postconnect.cpp b/plugins/postconnect.cpp index bac219e..f5dc4c1 100644 --- a/plugins/postconnect.cpp +++ b/plugins/postconnect.cpp @@ -22,7 +22,7 @@ extern "C" void plugin (plugincontext* context, ircmessage msg, TPluginParentLig cout << parent->get_parent()->get_networkname() << endl; cout << config.get_string(parent->get_parent()->get_networkname() + ".join") << endl; //evtl aus datei lesen? - parent->get_parent()->send ("join #DrunkenMan" NEWLINE); + parent->get_parent()->send ("join " + config.get_string(parent->get_parent()->get_networkname() + ".join") + NEWLINE); if (config.is_string(parent->get_parent()->get_networkname()+".pass")) parent->get_parent()->send("PRIVMSG NickServ :identify "+config.get_string(parent->get_parent()->get_networkname()+".nick")+" "+config.get_string(parent->get_parent()->get_networkname()+".pass")); -- cgit v1.2.1