Permalink
Browse files

Add /finishconn command, because some servers give us the silent trea…

…tment

We don't know when we're connected and can send PASS/NICK/USER.
  • Loading branch information...
1 parent ec75086 commit c5f4be389154273d5f3cd9f3fab3edb13e836c75 @ec429 committed Jul 29, 2016
Showing with 9 additions and 0 deletions.
  1. +9 −0 cmd.c
View
@@ -13,6 +13,7 @@ CMD_FUN (close);
CMD_FUN (log);
CMD_FUN (set);
CMD_FUN (server);
+CMD_FUN (finishconn);
CMD_FUN (reconnect);
CMD_FUN (disconnect);
CMD_FUN (realsname);
@@ -85,6 +86,8 @@ int init_cmds()
ADD_CMD ("server", server, "/server <url> [<pass>]\nConnect to the given server.");
ADD_CMD ("connect", server, "/connect <url> [<pass>]\nConnect to the given server.");
+ ADD_CMD ("finishconn", finishconn, "/finishconn\nForce connection to completion; use if server is being silent.");
+
ADD_CMD ("reconnect", reconnect, "/reconnect\nReconnects to a server which has become disconnected.");
ADD_CMD ("disconnect", disconnect, "/disconnect [msg]\nDisconnect from the current server and leave a message.");
@@ -637,6 +640,12 @@ CMD_FUN (server)
return (0);
}
+CMD_FUN (finishconn)
+{
+ irc_conn_rest(cbuf, bufs[cbuf].nick?bufs[cbuf].nick:bufs[0].nick, username, pass, fname);
+ return(0);
+}
+
CMD_FUN (reconnect)
{
if (bufs[cbuf].server)

0 comments on commit c5f4be3

Please sign in to comment.