]> jfr.im git - irc/gameservirc.git/blob - gameserv/contrib/gameserv-1.1.5+hybrid_0.3.diff
Now saving inventory to players.dat. Updates made in an attempt to use old databases.
[irc/gameservirc.git] / gameserv / contrib / gameserv-1.1.5+hybrid_0.3.diff
1 diff -uNrd gameserv-1.1.5.dist/configscript.cpp gameserv-1.1.5/configscript.cpp
2 --- gameserv-1.1.5.dist/configscript.cpp Thu Nov 6 23:10:32 2003
3 +++ gameserv-1.1.5/configscript.cpp Fri Nov 28 19:04:20 2003
4 @@ -27,13 +27,20 @@
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 break;
20 default:
21 - continue;
22 + continue;
23 }
24 }while (c == 'Q' || c == 'q' || (int(c) < 48) || (int(c) > 57));
25
26 @@ -46,8 +53,9 @@
27 char selection = 0;
28
29 cout << "Choose your IRCD" << endl;
30 - cout << "1. Unreal3.x\r\n"
31 - << "2. bahamut-1.4.x" << endl;
32 + cout << "1. Unreal3.x" << endl
33 + << "2. bahamut-1.4.x" << endl
34 + << "3. ircd-hybrid, ircd-ratbox, or csircd" << endl;
35 cout << "Make your selection: ";
36 cin >> selection;
37 return selection;
38 diff -uNrd gameserv-1.1.5.dist/tcpclient.cpp gameserv-1.1.5/tcpclient.cpp
39 --- gameserv-1.1.5.dist/tcpclient.cpp Tue Nov 25 01:09:43 2003
40 +++ gameserv-1.1.5/tcpclient.cpp Fri Nov 28 19:11:44 2003
41 @@ -26,7 +26,7 @@
42 #include <stdlib.h>
43
44 char *PACKAGE = "GameServ";
45 -char *VERSION = "1.1.5";
46 +char *VERSION = "1.1.5+hybrid_0.3";
47
48 int sock;
49 long timestamp;
50 @@ -79,8 +79,17 @@
51 raw("NICK %S 1 %d +o %s %s %s 0 :GameServ", time(NULL), gsident, gshost,
52 servername);
53 raw(":%s SJOIN %d %d %s +mnt :@%S", servername, time(NULL), time(NULL), c_Forest);
54 +#elif defined(HYBRID)
55 + raw("PASS %s :TS", remotepass);
56 + raw("SERVER %s 1 :%s", servername, servername);
57 + raw("NICK %S 1 %d +o %s %s %s :GameServ", time(NULL), gsident, gshost,
58 + servername);
59 + // Sending a timestamp of 1 to force ops.
60 + raw(":%s SJOIN 1 %s +ntm :@%S", servername, c_Forest);
61 #endif
62 +#ifndef HYBRID
63 raw(":%S MODE %s +o %S", c_Forest);
64 +#endif
65 raw(":%S TOPIC %s :%s", c_Forest, c_ForestTopic);
66
67 sock_gets(sock,buffer,sizeof(buffer)-1); /* -1 added thanks to
68 @@ -184,18 +193,31 @@
69 if (stricmp(channel, c_Forest) == 0 && is_playing(source + 1))
70 raw(":%S MODE %s +v %s", c_Forest, (source + 1));
71
72 - #if defined(BAHAMUT)
73 +#if defined(BAHAMUT) || defined(HYBRID)
74 } else if (stricmp(cmd, "SJOIN") == 0) {
75 - char *channel, *nick;
76 + char *channel, *nick, *tmp, *rest;
77 strtok(NULL, " "); // Ignore the TS
78 +#ifndef HYBRID
79 strtok(NULL, " "); // Ignore the TS
80 +#endif
81 channel = strtok(NULL, " ");
82 - strtok(NULL, " ");
83 - nick = strtok(NULL, " ");
84 - nick++; // Get rid of the :
85 - if (stricmp(channel, c_Forest) == 0 && is_playing(nick))
86 - raw(":%S MODE %s +v %s", channel, nick);
87 - #endif
88 + rest = strtok(NULL, "");
89 + tmp = strchr(rest, ':');
90 + tmp++;
91 + nick = strtok(tmp, " ");
92 + while (nick != NULL)
93 + {
94 + if (*nick == '@')
95 + nick++;
96 + if (*nick == '+')
97 + nick++; // Assume for users set op and voice, they
98 + // are never passed as +@nick
99 + if (stricmp(channel, c_Forest) == 0 && is_playing(nick))
100 + raw(":%S MODE %s +v %s", channel, nick);
101 +
102 + nick = strtok(NULL, " ");
103 + }
104 +#endif
105
106 } else {
107 // cout << "Unrecognized Message: cmd = " << cmd << setw(30) << "source = " <<