diff options
| author | Florian Jung <florian.a.jung@web.de> | 2013-02-16 16:48:22 +0100 | 
|---|---|---|
| committer | Florian Jung <florian.a.jung@web.de> | 2013-02-16 16:48:22 +0100 | 
| commit | e57383a387729e496591aa878fc13ab1f9426461 (patch) | |
| tree | 345b8fe0b46720bccd54f14ceccb9e5d21c79cbc | |
| parent | 74377ece178e661194a40fa79238b3089bb0d0f2 (diff) | |
JOIN gefixt
| -rw-r--r-- | TChannel.cpp | 4 | ||||
| -rw-r--r-- | TConnection.cpp | 2 | ||||
| -rw-r--r-- | TODO | 14 | ||||
| -rw-r--r-- | etc/drunkenman.conf | 5 | ||||
| -rw-r--r-- | 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)) @@ -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"));  | 
