return FALSE;
}
+void silc_say(SilcClient client, SilcClientConnection conn,
+ char *msg, ...)
+{
+ va_list vp;
+ char message[2048];
+ SilcClientInternal app = (SilcClientInternal)client->application;
+
+ memset(message, 0, sizeof(message));
+ strncat(message, "\n*** ", 5);
+
+ va_start(vp, msg);
+ vsprintf(message + 5, msg, vp);
+ va_end(vp);
+
+ /* Print the message */
+ silc_print_to_window(app->screen->output_win[0], message);
+}
+
/* Prints a message with three star (*) sign before the actual message
on the current output window. This is used to print command outputs
and error messages. */
-void silc_say(SilcClient client, SilcClientConnection conn,
- char *msg, ...)
+void silc_op_say(SilcClient client, SilcClientConnection conn,
+ SilcClientMessageType type, char *msg, ...)
{
va_list vp;
char message[2048];
k++;
}
- client->ops->say(client, conn, "Users on %s: %s", channel->channel_name,
+ silc_say(client, conn, "Users on %s: %s", channel->channel_name,
name_list);
silc_free(name_list);
}
tmp = silc_argument_get_arg_type(silc_command_get_args(cmd_payload),
3, NULL);
if (tmp)
- client->ops->say(client, conn, "%s: %s", tmp,
+ silc_say(client, conn, "%s: %s", tmp,
silc_client_command_status_message(status));
else
- client->ops->say(client, conn, "%s",
+ silc_say(client, conn, "%s",
silc_client_command_status_message(status));
break;
}
strncat(buf, ")", 1);
}
- client->ops->say(client, conn, "%s", buf);
+ silc_say(client, conn, "%s", buf);
if (channels) {
SilcDList list = silc_channel_payload_parse_list(channels);
silc_free(m);
}
- client->ops->say(client, conn, "%s", buf);
+ silc_say(client, conn, "%s", buf);
silc_channel_payload_list_free(list);
}
}
if (mode) {
if ((mode & SILC_UMODE_SERVER_OPERATOR) ||
(mode & SILC_UMODE_ROUTER_OPERATOR))
- client->ops->say(client, conn, "%s is %s", nickname,
+ silc_say(client, conn, "%s is %s", nickname,
(mode & SILC_UMODE_SERVER_OPERATOR) ?
"Server Operator" :
(mode & SILC_UMODE_ROUTER_OPERATOR) ?
"SILC Operator" : "[Unknown mode]");
if (mode & SILC_UMODE_GONE)
- client->ops->say(client, conn, "%s is gone", nickname);
+ silc_say(client, conn, "%s is gone", nickname);
}
if (idle && nickname)
- client->ops->say(client, conn, "%s has been idle %d %s",
+ silc_say(client, conn, "%s has been idle %d %s",
nickname,
idle > 60 ? (idle / 60) : idle,
idle > 60 ? "minutes" : "seconds");
tmp = silc_argument_get_arg_type(silc_command_get_args(cmd_payload),
3, NULL);
if (tmp)
- client->ops->say(client, conn, "%s: %s", tmp,
+ silc_say(client, conn, "%s: %s", tmp,
silc_client_command_status_message(status));
else
- client->ops->say(client, conn, "%s",
+ silc_say(client, conn, "%s",
silc_client_command_status_message(status));
break;
}
strncat(buf, ")", 1);
}
- client->ops->say(client, conn, "%s", buf);
+ silc_say(client, conn, "%s", buf);
}
break;
client_id_list = va_arg(vp, SilcBuffer);
if (topic)
- client->ops->say(client, conn, "Topic for %s: %s",
+ silc_say(client, conn, "Topic for %s: %s",
app->screen->bottom_line->channel, topic);
app->screen->bottom_line->channel_mode =
/* SILC client operations */
SilcClientOperations ops = {
- silc_say,
+ silc_op_say,
silc_channel_message,
silc_private_message,
silc_notify,