{
SilcClientCommandPending *reply;
- /* Check whether identical pending already exists for same command,
- ident, callback and callback context. If it does then it would be
- error to register it again. */
- silc_dlist_start(conn->pending_commands);
- while ((reply = silc_dlist_get(conn->pending_commands)) != SILC_LIST_END) {
- if (reply->reply_cmd == reply_cmd && reply->ident == ident &&
- reply->callback == callback && reply->context == context)
- return;
- }
-
reply = silc_calloc(1, sizeof(*reply));
reply->reply_cmd = reply_cmd;
reply->ident = ident;
if (cmd->argv[1][0] == '*') {
if (!conn->current_channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on any channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
}
if (!conn->current_channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on that channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
/* Get the Channel ID of the channel */
if (!silc_idcache_find_by_name_one(conn->channel_cache, name, &id_cache)) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on that channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
if (cmd->argv[1][0] == '*') {
if (!conn->current_channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on any channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
channel = silc_client_get_channel(cmd->client, conn, name);
if (!channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are on that channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
if (cmd->argv[1][0] == '*') {
if (!conn->current_channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on any channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
channel = silc_client_get_channel(cmd->client, conn, name);
if (!channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are on that channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
if (cmd->argv[1][0] == '*') {
if (!conn->current_channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on any channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
channel = silc_client_get_channel(cmd->client, conn, name);
if (!channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are on that channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
else
mode &= ~SILC_CHANNEL_UMODE_BLOCK_MESSAGES_ROBOTS;
break;
+ case 'q':
+ if (add)
+ mode |= SILC_CHANNEL_UMODE_QUIET;
+ else
+ mode &= ~SILC_CHANNEL_UMODE_QUIET;
+ break;
default:
COMMAND_ERROR(SILC_STATUS_ERR_UNKNOWN_MODE);
goto out;
if (cmd->argv[1][0] == '*') {
if (!conn->current_channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on any channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
}
if (!conn->current_channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on that channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
/* Get the Channel ID of the channel */
if (!silc_idcache_find_by_name_one(conn->channel_cache, name, &id_cache)) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on that channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
if (cmd->argv[1][0] == '*') {
if (!conn->current_channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on any channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
channel = silc_client_get_channel(cmd->client, conn, name);
if (!channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are noton that channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
if (cmd->argv[1][0] == '*') {
if (!conn->current_channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on any channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
/* Get the channel entry */
channel = silc_client_get_channel(cmd->client, conn, name);
if (!channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on that channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}
if (cmd->argv[1][0] == '*') {
if (!conn->current_channel) {
- SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "You are not on any channel");
COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
goto out;
}