projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Another year is about to end... So we have to update these damn copyright information :P
[NeonServV5.git]
/
src
/
cmd_neonserv_extscript.c
diff --git
a/src/cmd_neonserv_extscript.c
b/src/cmd_neonserv_extscript.c
index 8c31bb29d5f258dc57a21ae35e6c097895f54f3d..d060d57e1ddc2155ca34d9bd7538aed04a1b0bd2 100644
(file)
--- a/
src/cmd_neonserv_extscript.c
+++ b/
src/cmd_neonserv_extscript.c
@@
-1,5
+1,5
@@
-/* cmd_neonserv_extscript.c - NeonServ v5.
2
- * Copyright (C) 2011 Philipp Kreil (pk910)
+/* cmd_neonserv_extscript.c - NeonServ v5.
3
+ * Copyright (C) 2011
-2012
Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-28,6
+28,7
@@
static TIMEQ_CALLBACK(neonserv_cmd_extscript_callback);
struct neonserv_cmd_extscript_cache {
struct ClientSocket *client, *textclient;
struct neonserv_cmd_extscript_cache {
struct ClientSocket *client, *textclient;
+ struct Event *event;
struct UserNode *user;
struct ChanNode *chan;
int answere_channel;
struct UserNode *user;
struct ChanNode *chan;
int answere_channel;
@@
-130,6
+131,7
@@
CMD_BIND(neonserv_cmd_extscript) {
}
cache->client = client;
cache->textclient = getTextBot();
}
cache->client = client;
cache->textclient = getTextBot();
+ cache->event = event;
cache->user = user;
cache->chan = chan;
cache->answere_channel = answere_channel;
cache->user = user;
cache->chan = chan;
cache->answere_channel = answere_channel;
@@
-152,6
+154,10
@@
static TIMEQ_CALLBACK(neonserv_cmd_extscript_callback) {
while (fgets(command, 512, cache->pipe) != NULL) {
if((a = strchr(command, '\n')))
*a = '\0';
while (fgets(command, 512, cache->pipe) != NULL) {
if((a = strchr(command, '\n')))
*a = '\0';
+ if(!stricmp(command, "/log")) {
+ logEvent(cache->event);
+ continue;
+ }
if(cache->answere_channel)
putsock(cache->client, "PRIVMSG %s :%s", cache->chan->name, command);
else
if(cache->answere_channel)
putsock(cache->client, "PRIVMSG %s :%s", cache->chan->name, command);
else