Changeset 3649 for trunk/auto-reply

Show
Ignore:
Timestamp:
01/27/04 02:47:49 (5 years ago)
Author:
dreamforce2
Message:

Make sending through server
- work again :-)
- optional through the config file

Location:
trunk/auto-reply
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/auto-reply/licq_autoreply.conf

    r2211 r3649  
    3434AbortDeleteOnExitCode = 1 
    3535 
     36# Set SendThroughServer = 1 if auto-reply should always send  
     37# messages through the server and never try to use  
     38# a direct connection. 
     39# 0 = Try to send direct 
     40# 1 = Send through server 
     41SendThroughServer = 1 
    3642 
    3743# Here is a simple example which will bounce the event 
  • trunk/auto-reply/src/autoreply.cpp

    r3552 r3649  
    8585  conf.ReadBool("FailOnExitCode", m_bFailOnExitCode, false); 
    8686  conf.ReadBool("AbortDeleteOnExitCode", m_bAbortDeleteOnExitCode, false); 
     87  conf.ReadBool("SendThroughServer", m_bSendThroughServer, true); 
    8788  conf.CloseFile(); 
    8889 
     
    214215    { 
    215216        user_event = e->UserEvent(); 
    216       licqDaemon->icqSendMessage(e->Uin(), user_event->Text(), false, 
     217      licqDaemon->icqSendMessage(e->Uin(), user_event->Text(), !m_bSendThroughServer, 
    217218        ICQ_TCPxMSG_URGENT); //urgent, because, hey, he asked us, right? 
    218219    } 
     
    298299  char *szText = new char[4096 + 256]; 
    299300  sprintf(szText, "%s", m_szMessage); 
    300   unsigned long tag = licqDaemon->icqSendMessage(nUin, szText, true, 
     301  unsigned long tag = licqDaemon->icqSendMessage(nUin, szText, !m_bSendThroughServer, 
    301302     ICQ_TCPxMSG_URGENT); 
    302303  delete []szText; 
  • trunk/auto-reply/src/autoreply.h

    r2211 r3649  
    2727  char *m_szStatus; 
    2828  char m_szProgram[512], m_szArguments[512]; 
    29   bool m_bPassMessage, m_bFailOnExitCode, m_bAbortDeleteOnExitCode; 
     29  bool m_bPassMessage, m_bFailOnExitCode, m_bAbortDeleteOnExitCode, 
     30       m_bSendThroughServer; 
    3031 
    3132  CICQDaemon *licqDaemon;