summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/irc.c16
-rw-r--r--src/map/irc.h6
2 files changed, 22 insertions, 0 deletions
diff --git a/src/map/irc.c b/src/map/irc.c
index 0104fcfb7..f1f6b0e0a 100644
--- a/src/map/irc.c
+++ b/src/map/irc.c
@@ -35,6 +35,7 @@ typedef int socklen_t;
#include "map.h"
#include "pc.h"
#include "irc.h"
+#include "intif.h" //For GM Broadcast [Zido]
short use_irc=0;
@@ -48,6 +49,9 @@ IRC_SI *irc_si=NULL;
char irc_nick[30]="";
char irc_password[32]="";
+// #define AUTH_PASS "setpasshere" //(WIP, don't remove) Password to use commands) [Zido]
+#define ALLOWED_NICK "" //Allowed nickname to use commands [Zido]
+
char irc_channel[32]="";
char irc_trade_channel[32]="";
@@ -195,6 +199,9 @@ void irc_send(char *buf)
void irc_parse_sub(int fd, char *incoming_string)
{
+ int i=0;
+ int authed=0;
+ char kami[256]; //[Zido]
char source[256];
char command[256];
char target[256];
@@ -250,6 +257,15 @@ void irc_parse_sub(int fd, char *incoming_string)
}
}
+ //if((strcmpi(command,"privmsg")==0)&&(strcmpi(message,"pass "AUTH_PASS"")==0)&&(target[0]!='#'))
+
+ // Broadcast [Zido] (Work in Progress)
+ if((strcmpi(command,"privmsg")==0)&&(sscanf(message,"!eakami %s",kami)>0)&&(strcmp(ALLOWED_NICK,source_nick)==0)) {
+ intif_GMmessage(kami,strlen(kami)+1,0);
+ sprintf(send_string,"NOTICE %s :Message Sent",source_nick);
+ irc_send(send_string);
+ }
+
return;
}
diff --git a/src/map/irc.h b/src/map/irc.h
index fe48c51ff..044aeddf9 100644
--- a/src/map/irc.h
+++ b/src/map/irc.h
@@ -1,5 +1,7 @@
#include "map.h"
+#define MAX_ADMINS 25 // [Zido]
+
extern short use_irc;
extern short irc_announce_flag;
@@ -24,4 +26,8 @@ struct IRC_Session_Info {
char username[30];
char password[33];
};
+
+/*struct IRC_Authed {
+ char host[256];
+};*/ //(WIP, Don't remove) [Zido]
typedef struct IRC_Session_Info IRC_SI;