exit(status);
}
+
int main (int argc, char *argv[])
{
Start();
for (int i = 0; i < module_names.size(); i++)
{
Version V = modules[i]->GetVersion();
- WriteServ(user->fd,"900 0x%08lx %d.%d.%d.%d :%s",modules[i],V.Major,V.Minor,V.Revision,V.Build,module_names[i].c_str());
+ WriteServ(user->fd,"900 %s :0x%08lx %d.%d.%d.%d %s",user->nick,modules[i],V.Major,V.Minor,V.Revision,V.Build,module_names[i].c_str());
}
}
}
int total_params = 0;
- for (int q = 0; q < strlen(cmd); q++)
+ if (strlen(cmd)>2)
{
- if (cmd[q] == ' ')
- total_params++;
+ for (int q = 0; q < strlen(cmd)-1; q++)
+ {
+ if ((cmd[q] == ' ') && (cmd[q+1] == ':'))
+ {
+ total_params++;
+ // found a 'trailing', we dont count them after this.
+ break;
+ }
+ if (cmd[q] == ' ')
+ total_params++;
+ }
}
// another phidjit bug...