]> jfr.im git - irc/gameservirc.git/blob - gameserv/contrib/gameserv-1.1.3+hybrid_0.2.diff
Switched the hybrid contrib files to an updated version for configscript. Thank you...
[irc/gameservirc.git] / gameserv / contrib / gameserv-1.1.3+hybrid_0.2.diff
1 diff -uNrd gameserv-1.1.3.dist/configscript.cpp gameserv-1.1.3/configscript.cpp
2 --- gameserv-1.1.3.dist/configscript.cpp Thu Nov 6 23:10:32 2003
3 +++ gameserv-1.1.3/configscript.cpp Fri Nov 7 12:46:51 2003
4 @@ -27,11 +27,17 @@
5 case '1':
6 outfile << "#define UNREAL" << endl;
7 outfile << "#undef BAHAMUT" << endl;
8 + outfile << "#undef HYBRID" << endl;
9 break;
10 case '2':
11 outfile << "#undef UNREAL" << endl;
12 outfile << "#define BAHAMUT" << endl;
13 + outfile << "#undef HYBRID" <<endl;
14 break;
15 + case '3':
16 + outfile << "#undef UNREAL" << endl;
17 + outfile << "#undef BAHAMUT" << endl;
18 + outfile << "#define HYBRID" <<endl;
19 default:
20 continue;
21 }
22 @@ -46,8 +52,9 @@
23 char selection = 0;
24
25 cout << "Choose your IRCD" << endl;
26 - cout << "1. Unreal3.x\r\n"
27 - << "2. bahamut-1.4.x" << endl;
28 + cout << "1. Unreal3.x" << endl
29 + << "2. bahamut-1.4.x" << endl
30 + << "3. ircd-hybrid, ircd-ratbox, or csircd" << endl;
31 cout << "Make your selection: ";
32 cin >> selection;
33 return selection;
34 diff -uNrd gameserv-1.1.3.dist/tcpclient.cpp gameserv-1.1.3/tcpclient.cpp
35 --- gameserv-1.1.3.dist/tcpclient.cpp Thu Nov 6 23:10:32 2003
36 +++ gameserv-1.1.3/tcpclient.cpp Fri Nov 7 13:00:10 2003
37 @@ -26,7 +26,7 @@
38 #include <stdlib.h>
39
40 char *PACKAGE = "GameServ";
41 -char *VERSION = "1.1.2";
42 +char *VERSION = "1.1.3+hybrid_0.2";
43
44 int sock;
45 long timestamp;
46 @@ -79,6 +79,13 @@
47 raw("NICK %S 1 %d +o %s %s %s 0 :GameServ", time(NULL), gsident, gshost,
48 servername);
49 raw(":%s SJOIN %d %d %s +mnt :@%S", servername, time(NULL), time(NULL), c_Forest);
50 +#elif defined(HYBRID)
51 + raw("PASS %s :TS", remotepass);
52 + raw("SERVER %s 1 :%s", servername, servername);
53 + raw("NICK %S 1 %d +o %s %s %s :GameServ", time(NULL), gsident, gshost,
54 + servername);
55 + // Sending a timestamp of 1 to force ops.
56 + raw(":%s SJOIN 1 %s +ntm :@%S", servername, c_Forest);
57 #endif
58 raw(":%S MODE %s +o %S", c_Forest);
59 raw(":%S TOPIC %s :%s", c_Forest, c_ForestTopic);
60 @@ -175,17 +182,30 @@
61 if (stricmp(channel, c_Forest) == 0 && is_playing(source + 1))
62 raw(":%S MODE %s +v %s", c_Forest, (source + 1));
63
64 - #if defined(BAHAMUT)
65 +#if defined(BAHAMUT) || defined(HYBRID)
66 } else if (stricmp(cmd, "SJOIN") == 0) {
67 - char *channel, *nick;
68 + char *channel, *nick, *tmp, *rest;
69 strtok(NULL, " "); // Ignore the TS
70 +#ifndef HYBRID
71 strtok(NULL, " "); // Ignore the TS
72 +#endif
73 channel = strtok(NULL, " ");
74 - strtok(NULL, " ");
75 - nick = strtok(NULL, " ");
76 - nick++; // Get rid of the :
77 - if (stricmp(channel, c_Forest) == 0 && is_playing(nick))
78 - raw(":%S MODE %s +v %s", channel, nick);
79 + rest = strtok(NULL, "");
80 + tmp = strchr(rest, ':');
81 + tmp++;
82 + nick = strtok(tmp, " ");
83 + while (nick != NULL)
84 + {
85 + if (*nick == '@')
86 + nick++;
87 + if (*nick == '+')
88 + nick++; // Assume for users set op and voice, they
89 + // are never passed as +@nick
90 + if (stricmp(channel, c_Forest) == 0 && is_playing(nick))
91 + raw(":%S MODE %s +v %s", channel, nick);
92 +
93 + nick = strtok(NULL, " ");
94 + }
95 #endif
96
97 } else {