1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
$NetBSD: patch-aa,v 1.1.1.1 2005/11/02 08:34:47 jlam Exp $
--- icb.c.orig 2005-09-18 04:44:15.000000000 -0400
+++ icb.c
@@ -661,6 +661,16 @@ icb_input_cb(gpointer data, gint source,
gaim_conv_chat_user_set_flags(GAIM_CONV_CHAT(conv), new_mod, GAIM_CBFLAGS_OP);
gaim_conv_chat_write(GAIM_CONV_CHAT(conv), "", packet->fields[1],
GAIM_MESSAGE_SYSTEM, time(NULL));
+ } else if (packet->nof == 2) {
+ char *tmp;
+ GaimConversation *conv;
+
+ conv = icb_get_current_group(gc->account, icb->chat_id);
+
+ tmp = g_strdup_printf(_("%s: %s"), packet->fields[0], packet->fields[1]);
+ gaim_conv_chat_write(GAIM_CONV_CHAT(conv), "", tmp,
+ GAIM_MESSAGE_SYSTEM, time(NULL));
+ g_free(tmp);
}
break;
case ICB_CMD_COMMAND_RESP:
@@ -984,6 +994,20 @@ icb_gaim_cmd_kick(GaimConversation *conv
return icb_gaim_send_cmd(conv, buf);
}
+static GaimCmdRet
+icb_gaim_cmd_brick(GaimConversation *conv,
+ const char *cmd, char **args, char **error, void *data)
+{
+ int r;
+ char buf[ICB_MAX_DATA_SIZE+1];
+
+ r = snprintf(buf, sizeof(buf), "server brick %s", args[0]);
+ if (r <= 0)
+ return GAIM_CMD_RET_FAILED;
+
+ return icb_gaim_send_cmd(conv, buf);
+}
+
static void
icb_set_chat_topic(GaimConnection *gc, int id, const char *topic)
{
@@ -1174,6 +1198,12 @@ _init_plugin(GaimPlugin *plugin)
icb_gaim_cmd_kick,
_("boot <nickname>: If you are group moderator, removes "nickname" from group"),
NULL);
+ gaim_cmd_register("brick","w", GAIM_CMD_P_PRPL,
+ GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM | GAIM_CMD_FLAG_PRPL_ONLY,
+ "prpl-icb",
+ icb_gaim_cmd_brick,
+ _("brick <nickname>: Throw a brick at "nickname""),
+ NULL);
gaim_cmd_register("m","ws", GAIM_CMD_P_PRPL,
GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM | GAIM_CMD_FLAG_PRPL_ONLY,
"prpl-icb",
|