|
@@ -856,7 +856,7 @@ static void cmd_who(int idx, char *par)
|
|
|
}
|
|
}
|
|
|
putlog(LOG_CMDS, "*", "#%s# who %s", dcc[idx].nick, par);
|
|
putlog(LOG_CMDS, "*", "#%s# who %s", dcc[idx].nick, par);
|
|
|
if (!egg_strcasecmp(par, conf.bot->nick))
|
|
if (!egg_strcasecmp(par, conf.bot->nick))
|
|
|
- tell_who(u, idx, dcc[idx].u.chat->channel);
|
|
|
|
|
|
|
+ tell_who(dcc[idx].user, idx, dcc[idx].u.chat->channel);
|
|
|
else {
|
|
else {
|
|
|
i = nextbot(par);
|
|
i = nextbot(par);
|
|
|
if (i < 0) {
|
|
if (i < 0) {
|
|
@@ -873,9 +873,9 @@ static void cmd_who(int idx, char *par)
|
|
|
} else {
|
|
} else {
|
|
|
putlog(LOG_CMDS, "*", "#%s# who", dcc[idx].nick);
|
|
putlog(LOG_CMDS, "*", "#%s# who", dcc[idx].nick);
|
|
|
if (dcc[idx].u.chat->channel < 0)
|
|
if (dcc[idx].u.chat->channel < 0)
|
|
|
- tell_who(u, idx, 0);
|
|
|
|
|
|
|
+ tell_who(dcc[idx].user, idx, 0);
|
|
|
else
|
|
else
|
|
|
- tell_who(u, idx, dcc[idx].u.chat->channel);
|
|
|
|
|
|
|
+ tell_who(dcc[idx].user, idx, dcc[idx].u.chat->channel);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
#endif /* HUB */
|
|
#endif /* HUB */
|
|
@@ -1331,7 +1331,7 @@ static void cmd_date(int idx, char *par)
|
|
|
static void cmd_chhandle(int idx, char *par)
|
|
static void cmd_chhandle(int idx, char *par)
|
|
|
{
|
|
{
|
|
|
char hand[HANDLEN + 1] = "", newhand[HANDLEN + 1] = "";
|
|
char hand[HANDLEN + 1] = "", newhand[HANDLEN + 1] = "";
|
|
|
- int atr = u ? u->flags : 0, atr2;
|
|
|
|
|
|
|
+ int atr = dcc[idx].user ? dcc[idx].user->flags : 0, atr2;
|
|
|
size_t i;
|
|
size_t i;
|
|
|
struct userrec *u2 = NULL;
|
|
struct userrec *u2 = NULL;
|
|
|
|
|
|
|
@@ -1417,7 +1417,8 @@ static void cmd_handle(int idx, char *par)
|
|
|
static void cmd_chpass(int idx, char *par)
|
|
static void cmd_chpass(int idx, char *par)
|
|
|
{
|
|
{
|
|
|
char *handle = NULL, *new = NULL, pass[MAXPASSLEN] = "";
|
|
char *handle = NULL, *new = NULL, pass[MAXPASSLEN] = "";
|
|
|
- int atr = u ? u->flags : 0, l;
|
|
|
|
|
|
|
+ int atr = dcc[idx].user ? dcc[idx].user->flags : 0, l;
|
|
|
|
|
+ struct userrec *u = NULL;
|
|
|
|
|
|
|
|
if (!par[0])
|
|
if (!par[0])
|
|
|
dprintf(idx, "Usage: chpass <handle> [password]\n");
|
|
dprintf(idx, "Usage: chpass <handle> [password]\n");
|
|
@@ -1472,7 +1473,8 @@ static void cmd_chpass(int idx, char *par)
|
|
|
static void cmd_chsecpass(int idx, char *par)
|
|
static void cmd_chsecpass(int idx, char *par)
|
|
|
{
|
|
{
|
|
|
char *handle = NULL, *new = NULL, pass[MAXPASSLEN + 1] = "";
|
|
char *handle = NULL, *new = NULL, pass[MAXPASSLEN + 1] = "";
|
|
|
- int atr = u ? u->flags : 0, l;
|
|
|
|
|
|
|
+ int atr = dcc[idx].user ? dcc[idx].user->flags : 0, l;
|
|
|
|
|
+ struct userrec *u = NULL;
|
|
|
|
|
|
|
|
if (!par[0])
|
|
if (!par[0])
|
|
|
dprintf(idx, "Usage: chsecpass <handle> [secpass/rand]\n");
|
|
dprintf(idx, "Usage: chsecpass <handle> [secpass/rand]\n");
|
|
@@ -1666,7 +1668,7 @@ static void cmd_chaddr(int idx, char *par)
|
|
|
dprintf(idx, "This command is only useful for tandem bots.\n");
|
|
dprintf(idx, "This command is only useful for tandem bots.\n");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if ((u1 && u1->bot) && (!u || !u->flags & USER_OWNER)) {
|
|
|
|
|
|
|
+ if ((u1 && u1->bot) && (!dcc[idx].user || !dcc[idx].user->flags & USER_OWNER)) {
|
|
|
dprintf(idx, "You can't change a bot's address.\n");
|
|
dprintf(idx, "You can't change a bot's address.\n");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|