From 3ddb7477f51d3cf1632e2a8b6f7da4c0609a52cb Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 26 Mar 2010 08:14:37 -0400 Subject: One total mess that doesn't do much yet, but reorganised some stuff and untying the IRC and the core parts a little bit. Lots of work left to do. --- ipc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ipc.c') diff --git a/ipc.c b/ipc.c index d6b850f1..2d833354 100644 --- a/ipc.c +++ b/ipc.c @@ -137,7 +137,7 @@ static void ipc_child_cmd_wallops( irc_t *irc, char **cmd ) return; if( strchr( irc->umode, 'w' ) ) - irc_write( irc, ":%s WALLOPS :%s", irc->myhost, cmd[1] ); + irc_write( irc, ":%s WALLOPS :%s", irc->root->host, cmd[1] ); } static void ipc_child_cmd_wall( irc_t *irc, char **cmd ) @@ -146,7 +146,7 @@ static void ipc_child_cmd_wall( irc_t *irc, char **cmd ) return; if( strchr( irc->umode, 's' ) ) - irc_write( irc, ":%s NOTICE %s :%s", irc->myhost, irc->nick, cmd[1] ); + irc_write( irc, ":%s NOTICE %s :%s", irc->root->host, irc->user->nick, cmd[1] ); } static void ipc_child_cmd_opermsg( irc_t *irc, char **cmd ) @@ -155,7 +155,7 @@ static void ipc_child_cmd_opermsg( irc_t *irc, char **cmd ) return; if( strchr( irc->umode, 'o' ) ) - irc_write( irc, ":%s NOTICE %s :*** OperMsg *** %s", irc->myhost, irc->nick, cmd[1] ); + irc_write( irc, ":%s NOTICE %s :*** OperMsg *** %s", irc->root->host, irc->user->nick, cmd[1] ); } static void ipc_child_cmd_rehash( irc_t *irc, char **cmd ) @@ -175,10 +175,10 @@ static void ipc_child_cmd_kill( irc_t *irc, char **cmd ) if( !( irc->status & USTATUS_LOGGED_IN ) ) return; - if( nick_cmp( cmd[1], irc->nick ) != 0 ) + if( nick_cmp( cmd[1], irc->user->nick ) != 0 ) return; /* It's not for us. */ - irc_write( irc, ":%s!%s@%s KILL %s :%s", irc->mynick, irc->mynick, irc->myhost, irc->nick, cmd[2] ); + irc_write( irc, ":%s!%s@%s KILL %s :%s", irc->root->nick, irc->root->nick, irc->root->host, irc->user->nick, cmd[2] ); irc_abort( irc, 0, "Killed by operator: %s", cmd[2] ); } @@ -187,7 +187,7 @@ static void ipc_child_cmd_hello( irc_t *irc, char **cmd ) if( !( irc->status & USTATUS_LOGGED_IN ) ) ipc_to_master_str( "HELLO\r\n" ); else - ipc_to_master_str( "HELLO %s %s :%s\r\n", irc->host, irc->nick, irc->realname ); + ipc_to_master_str( "HELLO %s %s :%s\r\n", irc->user->host, irc->user->nick, irc->user->fullname ); } static const command_t ipc_child_commands[] = { -- cgit v1.2.3