$Log$
+Revision 1.345 1999/08/04 02:21:45 ajc
+* Fixed some bugs in the ICQ metaclient, and documented the new protocol cmds
+
Revision 1.344 1999/08/03 11:34:35 ajc
* Added client_icq.c and client_icq.h
Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Initial CVS import
-
}
icq_SendContactList();
+
+ if (ThisICQ->icq_numcl) for (i=0; i<ThisICQ->icq_numcl; ++i) {
+ if (ThisICQ->icq_cl[i].uin > 0L) {
+ icq_SendInfoReq(ThisICQ->icq_cl[i].uin);
+ }
+ }
}
void CtdlICQ_after_cmd_hook(void)
{
if (ThisICQ->icq_Sok >= 0) {
- if ( (time(NULL) - ThisICQ->icq_LastKeepAlive) > 90 ) {
+ if ( (time(NULL) - ThisICQ->icq_LastKeepAlive) > 60 ) {
icq_KeepAlive();
ThisICQ->icq_LastKeepAlive = time(NULL);
}
char from[256];
int num_delivered;
+ int i;
+ /* Default sender is 'uin@icq' syntax */
sprintf(from, "%ld@icq", uin);
+
+ /* Use the sender's name if we have it inthe contact list */
+ if (ThisICQ->icq_numcl) for (i=0; i<ThisICQ->icq_numcl; ++i) {
+ if (uin == ThisICQ->icq_cl[i].uin) {
+ safestrncpy(from, ThisICQ->icq_cl[i].name, 256);
+ }
+ }
+
num_delivered = PerformXmsgHooks(from, CC->curr_user, (char *)msg);
lprintf(9, "Delivered to %d users\n", num_delivered);
}
struct CtdlICQ_CL *ptr;
+ CtdlICQ_Read_CL();
ptr = CtdlICQ_CLent(uin);
safestrncpy(ptr->name, nick, 32);
ptr->status = STATUS_OFFLINE;
uin = extract_long(buf, 0);
if (uin > 0L) {
CtdlICQ_CLent(uin);
- icq_SendInfoReq(uin);
}
}
CtdlICQ_Write_CL();
server return code messages, between the return code and the parameters. In
much the same way as FTP uses "-" to signify a continuation, Citadel uses
an "*" in this position to signify the presence of waiting express messages.
+
+
+
+ CICQ (Citadel ICQ metaclient setup)
+
+ If a Citadel server has the ICQ Metaclient installed, this command is used
+to configure it. It has several usages:
+
+ CICQ login|uin|pass
+
+ This tells Citadel the user's ICQ uin (second argument) and password (third
+argument). When called in this fashion, CICQ will return either OK or ERROR.
+It should be noted, however, that the only way an ERROR code can be returned
+is if the uin and/or password is not supplied. Authentication failures cannot
+be immediately detected, because the ICQ protocol is asynchronous.
+
+ CICQ getcl
+
+ Request the current contact list. If successful, CICQ will return
+LISTING_FOLLOWS followed by zero or more contacts in the format
+
+ uin|nickname|status
+
+ CICQ putcl
+
+ Upload a new contact list. If successful, CICQ will return SEND_LISTING
+after which the client should transmit zero or more uin's, one per line. The
+server will then attempt to contact the ICQ server to determine nicknames
+and statuses.
+
+ CICQ status
+
+ Always returns OK followed by a 1 (connected to ICQ) or 0 (not connected).