Changeset 1193 for trunk/auto-reply
- Timestamp:
- 03/01/00 05:05:44 (9 years ago)
- Location:
- trunk/auto-reply/src
- Files:
-
- 2 modified
-
autoreply.cpp (modified) (3 diffs)
-
autoreply.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/auto-reply/src/autoreply.cpp
r1124 r1193 178 178 case SIGNAL_UPDATExUSER: 179 179 if (s->SubSignal() == USER_EVENTS && s->Uin() != gUserManager.OwnerUin()) 180 ProcessUserEvent(s->Uin() );180 ProcessUserEvent(s->Uin(), s->Argument()); 181 181 break; 182 182 // We should never get any other signal … … 231 231 232 232 233 void CLicqAutoReply::ProcessUserEvent(unsigned long nUin )233 void CLicqAutoReply::ProcessUserEvent(unsigned long nUin, unsigned long nId) 234 234 { 235 235 ICQUser *u = gUserManager.FetchUser(nUin, LOCK_W); 236 236 if (u == NULL) 237 237 { 238 gLog.Warn(" Invalid uin received from daemon (%ld).\n", nUin);238 gLog.Warn("%sInvalid uin received from daemon (%ld).\n", L_AUTOREPxSTR, nUin); 239 239 return; 240 240 } 241 241 242 CUserEvent *e = NULL; 243 244 if (m_bDelete) 245 { 246 while (u->NewMessages() > 0) 247 { 248 // Fetch the event 249 e = u->EventPop(); 250 // Forward it 251 if (!ForwardEvent(u, e)) break; 252 // Erase the event 253 delete e; 254 } 242 CUserEvent *e = u->EventPeekId(nId); 243 244 if (e == NULL) 245 { 246 gLog.Warn("%sInvalid message id (%d).\n", L_AUTOREPxSTR, nId); 255 247 } 256 248 else 257 249 { 258 e = u->EventPeekLast();259 // Forward it260 ForwardEvent(u, e);250 bool r = AutoReplyEvent(u, e); 251 if (m_bDelete && r) 252 u->EventClearId(nId); 261 253 } 262 254 … … 265 257 266 258 267 bool CLicqAutoReply:: ForwardEvent(ICQUser *u, CUserEvent *e)259 bool CLicqAutoReply::AutoReplyEvent(ICQUser *u, CUserEvent *e) 268 260 { 269 261 FILE *output; -
trunk/auto-reply/src/autoreply.h
r1120 r1193 36 36 void ProcessEvent(ICQEvent *); 37 37 38 void ProcessUserEvent(unsigned long );39 bool ForwardEvent(ICQUser *, CUserEvent *);38 void ProcessUserEvent(unsigned long, unsigned long); 39 bool AutoReplyEvent(ICQUser *, CUserEvent *); 40 40 41 41 };
