[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/workwizu workwizu.c,1.1,1.2
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/workwizu workwizu.c,1.1,1.2 |
Date: |
Tue, 07 Jan 2003 19:42:16 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/workwizu
In directory subversions:/tmp/cvs-serv22187/modules/workwizu
Modified Files:
workwizu.c
Log Message:
workwizu fixes
Index: workwizu.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/workwizu/workwizu.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- workwizu.c 7 Jan 2003 19:02:33 -0000 1.1
+++ workwizu.c 8 Jan 2003 00:42:14 -0000 1.2
@@ -83,9 +83,9 @@
static int ref_count = 0;
static tag_info tags[21];
-static char *server = "212.37.193.123";
-static int port = 32002;
-static char *owner = "savoirweb";
+static char server[MAX_PREF_LEN] = "212.37.193.123";
+static char port[MAX_PREF_LEN] = "32002";
+static char owner[MAX_PREF_LEN] = "savoirweb";
static wwz_user *my_user;
@@ -111,11 +111,33 @@
int plugin_init()
{
int count;
+ input_list *il = g_new0(input_list, 1);
+
eb_debug(DBG_MOD, "Workwizu init\n");
ref_count=0;
for(count=0;count<20;count++)
tags[count].fd=-1;
+ plugin_info.prefs = il;
+
+ il->widget.entry.value = server;
+ il->widget.entry.name = "server";
+ il->widget.entry.label = _("Server:");
+ il->type = EB_INPUT_ENTRY;
+
+ il->next = g_new0(input_list, 1);
+ il = il->next;
+ il->widget.entry.value = port;
+ il->widget.entry.name = "port";
+ il->widget.entry.label = _("Port:");
+ il->type = EB_INPUT_ENTRY;
+
+ il->next = g_new0(input_list, 1);
+ il = il->next;
+ il->widget.entry.value = owner;
+ il->widget.entry.name = "owner";
+ il->widget.entry.label = _("Distbase:");
+ il->type = EB_INPUT_ENTRY;
return(0);
}
@@ -265,10 +287,11 @@
user->is_driver = !strcmp(tokens[0],"true");
user->is_typing = !strcmp(tokens[6],"true");
user->has_speak = !strcmp(tokens[1],"true");
- if (!user->has_speak)
-
+ printf("%s has %s speak\n",sfrom, user->has_speak?"":"not");
+ buddy_update_status(ea);
if (user->is_typing && do_typing_notify)
eb_update_status(ea, _("typing..."));
+ g_free(sfrom);
}
@@ -349,11 +372,17 @@
break;
case CHAT:
get_message(from, data);
+ break;
case ALLOWSPEAK:
+ eb_debug(DBG_MOD,"yeah, right to speak\n");
my_user->has_speak = 1;
+ break;
case STOPSPEAK:
+ eb_debug(DBG_MOD,"server told me to shut up\n");
my_user->has_speak = 0;
+ break;
case USERSTATE:
+ parse_stats(from, data);
break;
default:
break;
@@ -534,7 +563,7 @@
strcpy(my_user->password, wad->password);
eb_debug(DBG_MOD, "Logging in\n");
- wad->sock = connect_socket(server, port);
+ wad->sock = connect_socket(server, atoi(port));
if (wad->sock == -1) {
eb_debug(DBG_MOD, "wad->sock=-1 !\n");
return;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/workwizu workwizu.c,1.1,1.2,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm configure.in,1.45,1.46 ChangeLog,1.45,1.46
- Next by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.44,1.45 configure.in,1.44,1.45
- Previous by thread:
[Ayttm-commits] CVS: ayttm configure.in,1.45,1.46 ChangeLog,1.45,1.46
- Next by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.44,1.45 configure.in,1.44,1.45
- Index(es):