]>
Commit | Line | Data |
---|---|---|
f27a378f | 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 @@ | |
f809a0d8 | 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; | |
f27a378f | 14 | + break; |
f809a0d8 | 15 | + case '3': |
16 | + outfile << "#undef UNREAL" << endl; | |
17 | + outfile << "#undef BAHAMUT" << endl; | |
18 | + outfile << "#define HYBRID" <<endl; | |
f27a378f | 19 | break; |
f809a0d8 | 20 | default: |
f27a378f | 21 | - continue; |
22 | + continue; | |
f809a0d8 | 23 | } |
f27a378f | 24 | }while (c == 'Q' || c == 'q' || (int(c) < 48) || (int(c) > 57)); |
25 | ||
26 | @@ -46,8 +53,9 @@ | |
f809a0d8 | 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; | |
f27a378f | 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 | |
f809a0d8 | 41 | @@ -26,7 +26,7 @@ |
42 | #include <stdlib.h> | |
43 | ||
44 | char *PACKAGE = "GameServ"; | |
f27a378f | 45 | -char *VERSION = "1.1.5"; |
46 | +char *VERSION = "1.1.5+hybrid_0.3"; | |
f809a0d8 | 47 | |
48 | int sock; | |
49 | long timestamp; | |
f27a378f | 50 | @@ -79,8 +79,17 @@ |
f809a0d8 | 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 | |
f27a378f | 62 | +#ifndef HYBRID |
f809a0d8 | 63 | raw(":%S MODE %s +o %S", c_Forest); |
f27a378f | 64 | +#endif |
f809a0d8 | 65 | raw(":%S TOPIC %s :%s", c_Forest, c_ForestTopic); |
f27a378f | 66 | |
67 | sock_gets(sock,buffer,sizeof(buffer)-1); /* -1 added thanks to | |
68 | @@ -184,18 +193,31 @@ | |
f809a0d8 | 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); | |
f27a378f | 87 | - #endif |
f809a0d8 | 88 | + rest = strtok(NULL, ""); |
89 | + tmp = strchr(rest, ':'); | |
90 | + tmp++; | |
91 | + nick = strtok(tmp, " "); | |
92 | + while (nick != NULL) | |
93 | + { | |
94 | + if (*nick == '@') | |
f27a378f | 95 | + nick++; |
f809a0d8 | 96 | + if (*nick == '+') |
f27a378f | 97 | + nick++; // Assume for users set op and voice, they |
98 | + // are never passed as +@nick | |
f809a0d8 | 99 | + if (stricmp(channel, c_Forest) == 0 && is_playing(nick)) |
f27a378f | 100 | + raw(":%S MODE %s +v %s", channel, nick); |
f809a0d8 | 101 | + |
102 | + nick = strtok(NULL, " "); | |
103 | + } | |
f27a378f | 104 | +#endif |
f809a0d8 | 105 | |
106 | } else { | |
f27a378f | 107 | // cout << "Unrecognized Message: cmd = " << cmd << setw(30) << "source = " << |