On Monday 17 March 2003 22:18, Norberto BENSA wrote:
> Hello,
>
> Is it possible to auto-delete those users who only talk to you once? I'm
> getting tired of manually delete ads....
>
> Regards,
> Norberto

for a quick solucion backup your ~/licq  (the usal disclamer)(this is 5 
minutes script) and run rem.sh. the bad thing is that this won't remove the 
users from the server contact list.

Another solution (remove users from the server list) would requiere to patch 
licq with fifo.diff, run licq, go online, run fifo.sh, and execute its 
output. I didn't t test nothing of this paragraph (the .diff compiles?) but 
you get the idea...

i hope that  all this is enought for you,
        Juan.

-- 
Buenos Aires, Argentina

Attachment: rem.sh
Description: application/shellscript

Attachment: fifo.sh
Description: application/shellscript

Index: src/fifo.cpp
===================================================================
RCS file: /cvsroot/licq/licq/src/fifo.cpp,v
retrieving revision 1.7
diff -u -d -p -r1.7 fifo.cpp
--- src/fifo.cpp	15 Mar 2003 01:24:43 -0000	1.7
+++ src/fifo.cpp	18 Mar 2003 02:11:10 -0000
@@ -85,6 +85,10 @@ static const char* const HELP_ADDUSER = 
 	"\tadduser <buddy>\n"
 	"\t\t add a user to your contact list. note\n"
 	"\t\tthat buddy must be an uin\n";
+static const char* const HELP_DELUSER =
+	"\tdeluser <buddy>\n"
+	"\t\tdeleletes an user from your contact list.\n"
+	"\t\tnote that buddy must be an uin\n";
 static const char* const HELP_USERINFO = 
 	"\tuserinfo <buddy>\n"
 	"\t\tupdates a buddy's user information\n";
@@ -342,6 +346,7 @@ static int fifo_sms_number(int argc, con
   return 0;
 }
 
+
 // redirect <file>
 static int
 fifo_redirect ( int argc, const char *const *argv, void *data)
@@ -396,6 +401,25 @@ fifo_adduser ( int argc, const char *con
 	return 0;
 }
 
+
+static int
+fifo_deluser ( int argc, const char *const *argv, void *data)
+{	unsigned long nUin;
+	CICQDaemon *d = (CICQDaemon *) data;
+
+	if( argc  == 1 )
+	{	ReportMissingParams(argv[0]);
+		return -1;
+	}
+	
+	if( atouin(argv[1],false,&nUin) )
+		d->icqRemoveUser(nUin);
+	else
+		ReportBadBuddy(argv[0],argv[1]);
+
+	return 0;
+}
+
 // userinfo <buddy>
 static int
 fifo_userinfo ( int argc, const char *const *argv, void *data)
@@ -515,6 +539,7 @@ static struct command_t fifocmd_table[]=
 	{"redirect",	fifo_redirect,	HELP_REDIRECT,	0},
 	{"debuglvl",	fifo_debuglvl,	HELP_DEBUGLVL,	0},
 	{"adduser",	fifo_adduser,	HELP_ADDUSER,	0},
+	{"deluser",	fifo_deluser,	HELP_DELUSER,	0},
 	{"userinfo",	fifo_userinfo,	HELP_USERINFO,	0},
 	{"exit",	fifo_exit,	HELP_EXIT,	0},
 	{"ui_viewevent",fifo_ui_viewevent, HELP_UIVIEWEVENT,0},

Attachment: pgp00000.pgp
Description: signature

Reply via email to