-/* modcmd.c - NeonServ v5.0
+/* modcmd.c - NeonServ v5.1
* Copyright (C) 2011 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
if(b[0] == '%') {
b++;
if(b[strlen(b)-1] == '-') {
- allargs = 1;
- b[strlen(b)-1] = '\0';
+ allargs = strlen(b)-1;
+ b[allargs] = '\0';
argi = atoi(b);
- b[strlen(b)-1] = '-';
+ b[allargs] = '-';
+ allargs = 1;
} else {
allargs = 0;
argi = atoi(b);