projects
/
NeonServV5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e926526
)
fixed last commit #2
author
pk910
<philipp@zoelle1.de>
Mon, 15 Aug 2011 04:08:00 +0000
(06:08 +0200)
committer
pk910
<philipp@zoelle1.de>
Mon, 15 Aug 2011 04:08:00 +0000
(06:08 +0200)
modcmd.c
patch
|
blob
|
history
diff --git
a/modcmd.c
b/modcmd.c
index 38f557edddbd1405815f124b70bd0c4250c08c63..98c9e2ea6ee4ce45cde164193cd77aca6e28bec2 100644
(file)
--- a/
modcmd.c
+++ b/
modcmd.c
@@
-80,7
+80,7
@@
static USERAUTH_CALLBACK(command_checked_auth) {
execute_cmd = 0;
}
if(execute_cmd) {
execute_cmd = 0;
}
if(execute_cmd) {
- cbind->func->func(cache->client, user, cache->chan, cache->argv, cache->argc);
+ c
ache->c
bind->func->func(cache->client, user, cache->chan, cache->argv, cache->argc);
}
free(cache->message);
free(cache);
}
free(cache->message);
free(cache);
@@
-140,8
+140,8
@@
static void handle_command(struct ClientSocket *client, struct UserNode *user, s
int uargpos = 0, argi, allargs = 0;
char *ppos = params;
char *prev_ppos = params;
int uargpos = 0, argi, allargs = 0;
char *ppos = params;
char *prev_ppos = params;
- while(
ppos = strstr(ppos, " "
)) {
- ppos = '\0';
+ while(
(ppos = strstr(ppos, " ")
)) {
+
*
ppos = '\0';
if(prev_ppos[0] == '%') {
prev_ppos++;
if(prev_ppos[strlen(prev_ppos)-1] == '-') {
if(prev_ppos[0] == '%') {
prev_ppos++;
if(prev_ppos[strlen(prev_ppos)-1] == '-') {
@@
-152,7
+152,7
@@
static void handle_command(struct ClientSocket *client, struct UserNode *user, s
argi = atoi(prev_ppos);
if(argi > 0) {
if(argi <= argc) continue;
argi = atoi(prev_ppos);
if(argi > 0) {
if(argi <= argc) continue;
- uarga[uargpos++] = argv[argi-1]
+ uarga[uargpos++] = argv[argi-1]
;
if(allargs) {
for(;argi < argc; argi++)
uarga[uargpos++] = argv[argi-1]
if(allargs) {
for(;argi < argc; argi++)
uarga[uargpos++] = argv[argi-1]
@@
-164,7
+164,6
@@
static void handle_command(struct ClientSocket *client, struct UserNode *user, s
} else {
uarga[uargpos++] = prev_ppos;
}
} else {
uarga[uargpos++] = prev_ppos;
}
- ppos = ' ';
ppos++;
prev_ppos = ppos;
}
ppos++;
prev_ppos = ppos;
}