[X2serv-cvs] [CVS] Module x2: Change committed
Brought to you by:
sirvulcan
From: Reed L. <r3...@us...> - 2003-06-13 03:04:06
|
Committer : Reed Loden <r3...@us...> CVSROOT : /cvsroot/x2serv Module : x2 Commit time: 2003-06-13 03:04:02 UTC Modified files: source/chan.c source/parse.c source/parse.h source/send.c Log message: Started to work on getting X2 to work with u2.10.11+ on the new AfterNET IRCd. ---------------------- diff included ---------------------- Index: x2/source/chan.c diff -u x2/source/chan.c:1.85 x2/source/chan.c:1.86 --- x2/source/chan.c:1.85 Sat May 17 20:43:45 2003 +++ x2/source/chan.c Thu Jun 12 20:03:49 2003 @@ -976,7 +976,7 @@ if(hptr && !strcmp(crypt("*",hptr->Pass), hptr->Pass)) { send_to_user(UserNode, "This version of X2 requires that all users have passwords set."); - send_to_user(UserNode, "Please set your password. T ype: /msg %s %s PASS * yournewpass", IrcNick, ChanNode->Name); + send_to_user(UserNode, "Please set your password. Type: /msg %s %s PASS * yournewpass", IrcNick, ChanNode->Name); } /* If they are (co)owner, mark that one has joined. */ Index: x2/source/parse.c diff -u x2/source/parse.c:1.77 x2/source/parse.c:1.78 --- x2/source/parse.c:1.77 Sat May 17 20:43:45 2003 +++ x2/source/parse.c Thu Jun 12 20:03:50 2003 @@ -48,47 +48,47 @@ int usercmd; } server_commands[] = { -/* Command function servers users .. */ - { "END_OF_BURST", m_eob, TRUE, FALSE }, - { "EOB_ACK", m_noop, TRUE, FALSE }, - { "DESYNCH", m_desynch, TRUE, FALSE }, - { "PING", m_ping, TRUE, FALSE }, - { "PONG", m_pong, TRUE, TRUE }, - { "PRIVMSG", m_privmsg, FALSE, TRUE }, - { "WC", m_noop, TRUE, TRUE }, - { "SERVER", m_server, TRUE, FALSE }, - { "BURST", m_burst, TRUE, FALSE }, +/* Command function servers users .. */ + { "EB", m_eob, TRUE, FALSE }, + { "EA", m_noop, TRUE, FALSE }, + { "DS", m_desynch, TRUE, FALSE }, + { "G", m_ping, TRUE, FALSE }, + { "Z", m_pong, TRUE, TRUE }, + { "P", m_privmsg, FALSE, TRUE }, + { "WC", m_noop, TRUE, TRUE }, + { "S", m_server, TRUE, FALSE }, + { "B", m_burst, TRUE, FALSE }, // wtf?? -// { "NOTICE", m_ping, TRUE, TRUE }, - { "NICK", m_nick, TRUE, TRUE }, - { "CREATE", m_create, FALSE, TRUE }, - { "JOIN", m_join, FALSE, TRUE }, - { "PART", m_part, FALSE, TRUE }, - { "MODE", m_mode, TRUE, TRUE }, - { "INVITE", m_noop, TRUE, TRUE }, - { "AWAY", m_away, FALSE, TRUE }, - { "WHOIS", m_whois, FALSE, TRUE }, - { "GLINE", m_gline, TRUE, TRUE }, - { "KICK", m_kick, TRUE, TRUE }, - { "QUIT", m_quit, FALSE, TRUE }, - { "KILL", m_kill, TRUE, TRUE }, - { "SQUIT", m_squit, TRUE, TRUE }, - { "TOPIC", m_noop , TRUE, TRUE }, - { "NOTICE", m_notice, TRUE, TRUE }, - { "INFO", m_noop, TRUE, TRUE }, - { "ADMIN", m_noop, TRUE, TRUE }, - { "CONNECT", m_noop, TRUE, TRUE }, - { "TIME", m_noop, TRUE, TRUE }, - { "TRACE", m_noop, TRUE, TRUE }, - { "MOTD", m_noop, TRUE, TRUE }, - { "RPING", m_noop, TRUE, TRUE }, - { "SILENCE", m_noop, TRUE, TRUE }, - { "UPING", m_noop, TRUE, TRUE }, - { "VERSION", m_noop, TRUE, TRUE }, - { "WALLOPS", m_noop, TRUE, TRUE }, - { "STATS", m_noop, TRUE, TRUE }, - { "SETTIME", m_settime, TRUE, FALSE }, - { NULL, NULL, FALSE, FALSE } +// { "O", m_ping, TRUE, TRUE }, + { "N", m_nick, TRUE, TRUE }, + { "C", m_create, FALSE, TRUE }, + { "J", m_join, FALSE, TRUE }, + { "L", m_part, FALSE, TRUE }, + { "M", m_mode, TRUE, TRUE }, + { "I", m_noop, TRUE, TRUE }, + { "A", m_away, FALSE, TRUE }, + { "W", m_whois, FALSE, TRUE }, + { "GL", m_gline, TRUE, TRUE }, + { "K", m_kick, TRUE, TRUE }, + { "Q", m_quit, FALSE, TRUE }, + { "D", m_kill, TRUE, TRUE }, + { "SQ", m_squit, TRUE, TRUE }, + { "T", m_noop, TRUE, TRUE }, + { "O", m_notice, TRUE, TRUE }, + { "F", m_noop, TRUE, TRUE }, + { "AD", m_noop, TRUE, TRUE }, + { "CO", m_noop, TRUE, TRUE }, + { "TI", m_noop, TRUE, TRUE }, + { "TR", m_noop, TRUE, TRUE }, + { "MO", m_noop, TRUE, TRUE }, + { "RI", m_noop, TRUE, TRUE }, + { "U", m_noop, TRUE, TRUE }, + { "UP", m_noop, TRUE, TRUE }, + { "V", m_noop, TRUE, TRUE }, + { "WA", m_noop, TRUE, TRUE }, + { "R", m_noop, TRUE, TRUE }, + { "SE", m_settime, TRUE, FALSE }, + { NULL, NULL, FALSE, FALSE } }; /* *INDENT-ON* */ Index: x2/source/parse.h diff -u x2/source/parse.h:1.10 x2/source/parse.h:1.11 --- x2/source/parse.h:1.10 Tue Apr 24 23:05:40 2001 +++ x2/source/parse.h Thu Jun 12 20:03:51 2003 @@ -1,7 +1,7 @@ int ProcessCommand(UserListType from, char *to, char *rest); int ProcessCTCP(UserListType from, char *to, char *rest); int ReadSocket(int TheSocket, char *Buffer); -/* m_fuctions */ +/* m_functions */ #define M_PARAMS ServerListType sptr, UserListType uptr, char* rest #define M_PARAMS_CALL sptr, uptr, rest Index: x2/source/send.c diff -u x2/source/send.c:1.34 x2/source/send.c:1.35 --- x2/source/send.c:1.34 Wed Feb 27 03:54:46 2002 +++ x2/source/send.c Thu Jun 12 20:03:51 2003 @@ -59,7 +59,7 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_nick("PRIVMSG %s :%s", to, buff); + send_command_from_nick("P %s :%s", to, buff); } void send_notice(char *to, char *rest, ...) @@ -70,7 +70,7 @@ va_start(args, rest); vsprintf(buff, rest, args); va_end(args); - send_command_from_nick("NOTICE %s :%s", to, buff); + send_command_from_nick("O %s :%s", to, buff); } void send_to_channel(ChannelListType cptr, char *sendtext,...) @@ -119,7 +119,7 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_nick("WALLOPS :%s", buff); + send_command_from_nick("WA :%s", buff); } void send_kick(ChannelListType cptr, UserListType uptr, char *format, ...) @@ -131,7 +131,7 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_nick("KICK %s %s :%s", cptr->Name, uptr->Numnick, buff); + send_command_from_nick("K %s %s :%s", cptr->Name, uptr->Numnick, buff); ProcessPart(cptr, uptr); } @@ -141,7 +141,7 @@ * returns the status, not our uplink. This is important * for getting good away status. */ - send_command_from_nick("WHOIS %c :%s", uptr->Numnick[0], uptr->Nick); + send_command_from_nick("W %c :%s", uptr->Numnick[0], uptr->Nick); } void send_chanmode(ChannelListType cptr, char *format, ...) @@ -153,28 +153,28 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_nick("MODE %s %s", cptr->Name, buff); + send_command_from_nick("M %s %s", cptr->Name, buff); } /* A simpler mode for all the stuff in chan.c */ void send_op(ChannelListType cptr, UserListType uptr) { - send_command_from_nick("MODE %s +o %s", cptr->Name, uptr->Numnick); + send_command_from_nick("M %s +o %s", cptr->Name, uptr->Numnick); } void send_deop(ChannelListType cptr, UserListType uptr) { - send_command_from_nick("MODE %s -o %s", cptr->Name, uptr->Numnick); + send_command_from_nick("M %s -o %s", cptr->Name, uptr->Numnick); } void send_voice(ChannelListType cptr, UserListType uptr) { - send_command_from_nick("MODE %s +v %s", cptr->Name, uptr->Numnick); + send_command_from_nick("M %s +v %s", cptr->Name, uptr->Numnick); } void send_devoice(ChannelListType cptr, UserListType uptr) { - send_command_from_nick("MODE %s -v %s", cptr->Name, uptr->Numnick); + send_command_from_nick("M %s -v %s", cptr->Name, uptr->Numnick); } void send_usermode(char *format, ...) @@ -186,7 +186,7 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_nick("MODE %s %s", NumNick, buff); + send_command_from_nick("M %s %s", NumNick, buff); } void send_wallchops(ChannelListType cptr, char *format, ...) @@ -198,7 +198,7 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_nick("WALLCHOPS %s :%s", cptr->Name, buff); + send_command_from_nick("WC %s :%s", cptr->Name, buff); } void send_kill(UserListType uptr, char *format, ...) @@ -210,7 +210,7 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_nick("KILL %s :%s", uptr->Numnick, buff); + send_command_from_nick("D %s :%s", uptr->Numnick, buff); } void send_gline(char *mask, time_t duration, char *format, ...) @@ -222,7 +222,7 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_server("GLINE * +%s %lu :%s", mask, duration, buff); + send_command_from_server("GL * +%s %lu :%s", mask, duration, buff); } void send_gline_to_server(char num, char *mask, time_t duration, char *format, ...) @@ -234,22 +234,22 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_server("GLINE %c +%s %lu :%s", num, mask, duration, buff); + send_command_from_server("GL %c +%s %lu :%s", num, mask, duration, buff); } void send_ungline(char *mask) { - send_command_from_server("GLINE * -%s", mask); + send_command_from_server("GL * -%s", mask); } void send_settime(time_t thetime) { - send_command_from_server("SETTIME %lu :%s", thetime, ServiceName); + send_command_from_server("SE %lu :%s", thetime, ServiceName); } void send_opchan(ChannelListType cptr) { - send_command_from_server("MODE %s +o %s 0", cptr->Name, NumNick); + send_command_from_server("M %s +o %s 0", cptr->Name, NumNick); } void send_hackmode(ChannelListType cptr, char *format, ...) @@ -261,7 +261,7 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_server("MODE %s %s %lu", cptr->Name, buff, 0); + send_command_from_server("M %s %s %lu", cptr->Name, buff, 0); } void send_join(ChannelListType cptr) @@ -271,7 +271,7 @@ else { /* Services CAN join +kibl channels without worry */ cptr->NumOfNicks++; - send_command_from_nick("JOIN %s", cptr->Name); + send_command_from_nick("J %s", cptr->Name); } } @@ -281,7 +281,7 @@ if (cptr->NumOfNicks == 0) cptr->CreationDate = Timestamp; cptr->NumOfNicks++; - send_command_from_nick("CREATE %s %lu", cptr->Name, Timestamp); + send_command_from_nick("C %s %lu", cptr->Name, Timestamp); } void send_part(ChannelListType cptr, char *format, ...) @@ -294,18 +294,18 @@ va_end(args); cptr->NumOfNicks--; - send_command_from_nick("PART %s :%s", cptr->Name, buff); + send_command_from_nick("L %s :%s", cptr->Name, buff); } void send_topic(ChannelListType cptr, char *topic) { /* Never really need %s formatting in topic */ - send_command_from_nick("TOPIC %s :%s", cptr->Name, topic); + send_command_from_nick("T %s :%s", cptr->Name, topic); } void send_invite(ChannelListType cptr, UserListType uptr) { - send_command_from_nick("INVITE %s :%s", uptr->Nick, cptr->Name); + send_command_from_nick("I %s :%s", uptr->Nick, cptr->Name); } void send_quit(char *format, ...) @@ -317,7 +317,7 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_nick("QUIT :%s", buff); + send_command_from_nick("Q :%s", buff); } void send_squit(char* who, char *format, ...) @@ -329,12 +329,12 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_server("SQUIT %s %s :%s", who, ServiceName, buff); + send_command_from_server("SQ %s %s :%s", who, ServiceName, buff); } void send_connect(char *servertoconnect, int port, ServerListType target) { - send_command_from_nick("CONNECT %s %d :%c", servertoconnect, port, target->numnick); + send_command_from_nick("CO %s %d :%c", servertoconnect, port, target->numnick); } void send_spoofserv(char *servname, int Numeric, char *format, ...) @@ -347,7 +347,7 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_server("SERVER %s 1 9999999999 9999999999 P10 %cD] 0 :%s", + send_command_from_server("S %s 1 9999999999 9999999999 P10 %cD] 0 :%s", servname, NumChar, buff); } @@ -365,12 +365,12 @@ void send_serverping(char *who) { - send_command_from_server("PING %s :%s", ServiceName, who); + send_command_from_server("G %s :%s", ServiceName, who); } void send_serverpong(char *who) { - send_command_from_server("PONG %s :%s", ServiceName, who); + send_command_from_server("Z %s :%s", ServiceName, who); } /* CTCPs */ @@ -427,12 +427,12 @@ void send_eob() { - send_command_from_server("END_OF_BURST"); + send_command_from_server("EB"); } void send_eob_ack() { - send_command_from_server("EOB_ACK"); + send_command_from_server("EA"); } void Authenticate(UpLinkList *UpLinkPtr) @@ -451,7 +451,7 @@ convert2y[ServiceNumeric], "X2 Channel Service"); /* <server> NICK <nick> <hops> <timestamp> <user> <host> <compressed ip> <3 letter numeric> :<username> */ - sendtosock(Sock, "%c NICK %s 1 %lu %s %s +%s %s %c%s :\002%c\002) /MSG %s Help (\002%c\002", + sendtosock(Sock, "%c N %s 1 %lu %s %s +%s %s %c%s :\002%c\002) /MSG %s Help (\002%c\002", convert2y[ServiceNumeric], IrcNick, LinkTimeStamp, IrcNick, /* user */ ServiceName, /* host */ @@ -471,7 +471,7 @@ */ void send_preauth_pong(char *arg) { - sendtosock(Sock, "PONG :%s", arg); /* Needs the : */ + sendtosock(Sock, "Z :%s", arg); /* Needs the : */ } void ModeChans() @@ -487,7 +487,7 @@ { if(TempChanPtr->settings[INCHAN]) { - sendtosock(Sock, ":%s MODE %s %s", IrcNick, TempChanPtr->Name, + sendtosock(Sock, ":%s M %s %s", IrcNick, TempChanPtr->Name, GetModeString(ModeString, TempChanPtr->PlusModes, TempChanPtr->MinModes, TempChanPtr->Key, TempChanPtr->Limit)); @@ -495,7 +495,7 @@ if(TempChanPtr->settings[INCHAN]) { if (strcmp(TempChanPtr->Topic, "*") && (TempChanPtr->settings[TOPICFREQ] > 0)) - sendtosock(Sock, ":%s TOPIC %s :%s", IrcNick, + sendtosock(Sock, ":%s T %s :%s", IrcNick, TempChanPtr->Name, TempChanPtr->Topic); } TempChanPtr = TempChanPtr->Next; @@ -519,7 +519,7 @@ if(TempChanPtr->settings[INCHAN]) { send_opchan(TempChanPtr); - sendtosock(Sock, ":%s MODE %s +o %s %lu", + sendtosock(Sock, ":%s M %s +o %s %lu", ServiceName, TempChanPtr->Name, IrcNick, BURSTCHANNELDATE); } @@ -541,7 +541,7 @@ if(TempChanPtr->settings[INCHAN]) { TempChanPtr->NumOfNicks++; /* Note that we joined the channel */ - sendtosock(Sock, "%c BURST %s %lu %s:o", + sendtosock(Sock, "%c B %s %lu %s:o", convert2y[ServiceNumeric], /* servers numnick */ TempChanPtr->Name, /* #channel */ TempChanPtr->CreationDate, /* Hopefully already set by other side BURST */ @@ -567,14 +567,10 @@ while (TempChanPtr) { if(TempChanPtr->settings[TOPICFREQ] && strcmp(TempChanPtr->Topic, "*")) - sendtosock(Sock, ":%s TOPIC %s :%s", IrcNick, TempChanPtr->Name, TempChanPtr->Topic); + sendtosock(Sock, ":%s T %s :%s", IrcNick, TempChanPtr->Name, TempChanPtr->Topic); TempChanPtr = TempChanPtr->Next; } } } } - - - - ----------------------- End of diff ----------------------- |