| 102 |
102 |
| 103 static struct _irc_user_cmd { |
103 static struct _irc_user_cmd { |
| 104 char *name; |
104 char *name; |
| 105 char *format; |
105 char *format; |
| 106 IRCCmdCallback cb; |
106 IRCCmdCallback cb; |
| |
107 char *help; |
| 107 } _irc_cmds[] = { |
108 } _irc_cmds[] = { |
| 108 { "action", ":", irc_cmd_ctcp_action }, |
109 { "action", ":", irc_cmd_ctcp_action, N_("action <action to perform>: Perform an action.") }, |
| 109 { "away", ":", irc_cmd_away }, |
110 { "away", ":", irc_cmd_away, N_("away [message]: Set an away message, or use no message to return from being away.") }, |
| 110 { "deop", ":", irc_cmd_op }, |
111 { "deop", ":", irc_cmd_op, N_("deop <nick1> [nick2] ...: Remove channel operator status from someone. You must have ops yourself to do this.") }, |
| 111 { "devoice", ":", irc_cmd_op }, |
112 { "devoice", ":", irc_cmd_op, N_("devoice <nick1> [nick2] ...: Remove channel voice status from someone, preventing them from speaking if the room is +m. You must have ops to do this.") }, |
| 112 { "invite", ":", irc_cmd_invite }, |
113 { "invite", ":", irc_cmd_invite, N_("invite <nick> [room]: Invite someone to join you in the specified chat room, or the current room.") }, |
| 113 { "j", "cv", irc_cmd_join }, |
114 { "j", "cv", irc_cmd_join, N_("j <room1>[,room2][,...] [key1[,key2][,...]]: Enter one or more chat rooms, optionally providing a channel key if needed.") }, |
| 114 { "join", "cv", irc_cmd_join }, |
115 { "join", "cv", irc_cmd_join, N_("join <room1>[,room2][,...] [key1[,key2][,...]]: Enter one or more chat rooms, optionally providing a channel key if needed.") }, |
| 115 { "kick", "n:", irc_cmd_kick }, |
116 { "kick", "n:", irc_cmd_kick, N_("kick <nick> [message]: Remove someone from a room. You must be a channel operator to do this.") }, |
| 116 { "list", ":", irc_cmd_list }, |
117 { "list", ":", irc_cmd_list, N_("list: Bring up the list of chat rooms. <i>Warning, some servers may disconnect you upon doing this.</i>") }, |
| 117 { "me", ":", irc_cmd_ctcp_action }, |
118 { "me", ":", irc_cmd_ctcp_action, N_("me <action to perform>: Perform an action.") }, |
| 118 { "mode", ":", irc_cmd_mode }, |
119 { "mode", ":", irc_cmd_mode, N_("mode <nick|channel> <+|-><A-Za-z>: Set or unset a channel or user mode.") }, |
| 119 { "msg", "t:", irc_cmd_privmsg }, |
120 { "msg", "t:", irc_cmd_privmsg, N_("msg <nick> <message>: Sent a message to a user (as opposed to a channel).") }, |
| 120 { "names", "c", irc_cmd_names }, |
121 { "names", "c", irc_cmd_names, N_("names [channel]: See who is in a channel.") }, |
| 121 { "nick", "n", irc_cmd_nick }, |
122 { "nick", "n", irc_cmd_nick, N_("nick <new nick name>: Change your nick name.") }, |
| 122 { "op", ":", irc_cmd_op }, |
123 { "op", ":", irc_cmd_op, N_("op <nick1> [nick2] ...: Grant channel operator status to someone. You must have ops yourself to do this.") }, |
| 123 { "operwall", ":", irc_cmd_wallops }, |
124 { "operwall", ":", irc_cmd_wallops, N_("operwall <message>: If you don't know what this is, you probably can't use it.") }, |
| 124 { "part", "c:", irc_cmd_part }, |
125 { "part", "c:", irc_cmd_part, N_("part [room] [message]: Leave the current room, or a specified room, with an optional message.") }, |
| 125 { "ping", "n", irc_cmd_ping }, |
126 { "ping", "n", irc_cmd_ping, N_("ping [nick]: Asks how much lag a user (or the server if no user specified) has.") }, |
| 126 { "query", "n:", irc_cmd_query }, |
127 { "query", "n:", irc_cmd_query, N_("query <nick> <message>: Sent a message to a user (as opposed to a channel).") }, |
| 127 { "quit", ":", irc_cmd_quit }, |
128 { "quit", ":", irc_cmd_quit, N_("quit [message]: Disconnect from the server, with an optional message.") }, |
| 128 { "quote", "*", irc_cmd_quote }, |
129 { "quote", "*", irc_cmd_quote, N_("quote [...]: Send a raw command to the server.") }, |
| 129 { "remove", "n:", irc_cmd_remove }, |
130 { "remove", "n:", irc_cmd_remove, N_("remove <nick> [message]: Remove someone from a room. You must be a channel operator to do this.") }, |
| 130 { "topic", ":", irc_cmd_topic }, |
131 { "topic", ":", irc_cmd_topic, N_("topic [new topic]: View or change the channel topic.") }, |
| 131 { "umode", ":", irc_cmd_mode }, |
132 { "umode", ":", irc_cmd_mode, N_("umode <+|-><A-Za-z>: Set or unset a user mode.") }, |
| 132 { "voice", ":", irc_cmd_op }, |
133 { "voice", ":", irc_cmd_op, N_("voice <nick1> [nick2] ...: Grant channel voice status to someone. You must have ops to do this.") }, |
| 133 { "wallops", ":", irc_cmd_wallops }, |
134 { "wallops", ":", irc_cmd_wallops, N_("wallops <message>: If you don't know what this is, you probably can't use it.") }, |
| 134 { "whois", "n", irc_cmd_whois }, |
135 { "whois", "n", irc_cmd_whois, N_("whois <nick>: Get information on a user.") }, |
| 135 { NULL, NULL, NULL } |
136 { NULL, NULL, NULL } |
| 136 }; |
137 }; |
| 137 |
138 |
| 138 static GaimCmdRet irc_parse_gaim_cmd(GaimConversation *conv, const gchar *cmd, |
139 static GaimCmdRet irc_parse_gaim_cmd(GaimConversation *conv, const gchar *cmd, |
| 139 gchar **args, gchar **error) |
140 gchar **args, gchar **error) |