Changeset 547
- Timestamp:
- 05/04/06 10:34:25 (3 years ago)
- Files:
-
- nepenthes/branches/nepenthes-experimental/modules/log-irc/IrcDialogue.cpp (modified) (2 diffs)
- nepenthes/branches/nepenthes-experimental/modules/log-irc/IrcDialogue.hpp (modified) (1 diff)
- nepenthes/branches/nepenthes-experimental/modules/log-irc/log-irc.conf.dist (modified) (1 diff)
- nepenthes/branches/nepenthes-experimental/modules/log-irc/log-irc.cpp (modified) (1 diff)
- nepenthes/branches/nepenthes-experimental/modules/log-irc/log-irc.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nepenthes/branches/nepenthes-experimental/modules/log-irc/IrcDialogue.cpp
r546 r547 71 71 m_ConsumeLevel = CL_ASSIGN; 72 72 m_LogIrc = logirc; 73 m_LoggedOn = false; 73 74 74 75 m_State = IRCDIA_REQUEST_SEND; … … 274 275 void IrcDialogue::loggedOn() 275 276 { 277 if(m_LoggedOn) 278 return; 279 280 try 281 { 282 string connectCommand = m_LogIrc->getConnectCommand(); 283 m_Socket->doRespond((char *) connectCommand.data(), connectCommand.size()); 284 } 285 catch(...) 286 { // no connect command was specified 287 } 288 276 289 string joinCommand = "JOIN " + m_LogIrc->getIrcChannel() + " " + m_LogIrc->getIrcChannelPass() + "\r\n"; 277 290 m_Socket->doRespond((char *) joinCommand.data(), joinCommand.size()); 291 292 m_LoggedOn = true; 278 293 } 279 294 nepenthes/branches/nepenthes-experimental/modules/log-irc/IrcDialogue.hpp
r546 r547 87 87 void processMessage(const char * origin, const char * target, const char * message); 88 88 89 bool m_Pinged ;89 bool m_Pinged, m_LoggedOn; 90 90 91 91 LogIrc *m_LogIrc; nepenthes/branches/nepenthes-experimental/modules/log-irc/log-irc.conf.dist
r546 r547 30 30 pass "foo"; 31 31 }; 32 33 // has to be one IRC command NOT terminated with \r\n 34 // connect-command = "PRIVMSG NickServ :IDENTIFY mypassword"; 32 35 }; 33 36 }; nepenthes/branches/nepenthes-experimental/modules/log-irc/log-irc.cpp
r546 r547 347 347 } 348 348 349 string LogIrc::getConnectCommand() 350 { 351 string connectCommand = m_Config->getValString("log-irc.irc.connect-command"); 352 353 if(connectCommand.empty()) 354 throw (void *) 0; 355 356 return connectCommand + "\r\n"; 357 } 358 359 349 360 void LogIrc::setDialogue(IrcDialogue *dia) 350 361 { nepenthes/branches/nepenthes-experimental/modules/log-irc/log-irc.hpp
r546 r547 88 88 string getTorServer(); 89 89 string getIrcServer(); 90 91 //! throws exception if no command was specified 92 string getConnectCommand(); 90 93 91 94
