[NeoStats-Devel] [Commits] r2549 - in trunk/src: . protocol

[email protected]
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Author: Mark
Date: Tue Apr 19 07:09:58 2005
New Revision: 2549

Modified:
   trunk/src/numerics.c
   trunk/src/protocol/asuka.c
   trunk/src/protocol/ircup10.c
   trunk/src/protocol/nefarious.c
Log:
core support for numerics with b64 origin server

Modified: trunk/src/numerics.c
==============================================================================
--- trunk/src/numerics.c	(original)
+++ trunk/src/numerics.c	Tue Apr 19 07:09:58 2005
@@ -24,6 +24,7 @@
 #include "neostats.h"
 #include "ircd.h"
 #include "numerics.h"
+#include "base64.h"
 
 ircd_cmd numeric_cmd_list[] = {
 	/*Message	Token	handler	usage */
@@ -54,6 +55,10 @@
 {
 	Client *s;
 
+	if( ircd_srv.protocol & PROTOCOL_B64SERVER )
+		origin = base64_to_server( origin );
+	if( !origin )
+		return;
 	s = FindServer( origin );
 	if( s ) {
 		strlcpy( s->version, argv[1], MAXHOST );
@@ -77,6 +82,10 @@
 {
 	Client *s;
 
+	if( ircd_srv.protocol & PROTOCOL_B64SERVER )
+		origin = base64_to_server( origin );
+	if( !origin )
+		return;
 	s = FindServer( origin );
 	if( s ) {
 		/* Convert "Server Up d days, hh:mm:ss" to seconds*/

Modified: trunk/src/protocol/asuka.c
==============================================================================
--- trunk/src/protocol/asuka.c	(original)
+++ trunk/src/protocol/asuka.c	Tue Apr 19 07:09:58 2005
@@ -250,8 +250,6 @@
 static void m_wallops( char *origin, char **argv, int argc, int srv );
 static void m_whois( char *origin, char **argv, int argc, int srv );
 static void m_vhost( char *origin, char **argv, int argc, int srv );
-static void m_numeric242( char *origin, char **argv, int argc, int srv );
-static void m_numeric351( char *origin, char **argv, int argc, int srv );
 
 ProtocolInfo protocol_info = 
 {
@@ -314,8 +312,6 @@
 	{MSG_WALLUSERS, TOK_WALLUSERS, m_wallusers, 0},
 	{MSG_WHOIS, TOK_WHOIS, m_whois, 0},
 	{MSG_ERROR, TOK_ERROR, _m_error, 0},
-	{"242", "242", m_numeric242, 0},
-	{"351", "351", m_numeric351, 0},
 	{0, 0, 0, 0},
 };
 
@@ -1115,16 +1111,6 @@
 	do_vhost( base64_to_nick( argv[0] ), argv[1] );
 }
 
-static void m_numeric242( char *origin, char **argv, int argc, int srv )
-{
-	_m_numeric242( base64_to_server( origin ), argv, argc, srv );
-}
-
-static void m_numeric351( char *origin, char **argv, int argc, int srv )
-{
-	_m_numeric351( base64_to_server( origin ), argv, argc, srv );
-}
-
 /* :<source> <command> <param1> <paramN> :<last parameter> */
 /* <source> <command> <param1> <paramN> :<last parameter> */
 int parse( void *notused, void *rline, size_t len )

Modified: trunk/src/protocol/ircup10.c
==============================================================================
--- trunk/src/protocol/ircup10.c	(original)
+++ trunk/src/protocol/ircup10.c	Tue Apr 19 07:09:58 2005
@@ -240,8 +240,6 @@
 static void m_wallops( char *origin, char **argv, int argc, int srv );
 static void m_whois( char *origin, char **argv, int argc, int srv );
 static void m_vhost( char *origin, char **argv, int argc, int srv );
-static void m_numeric242( char *origin, char **argv, int argc, int srv );
-static void m_numeric351( char *origin, char **argv, int argc, int srv );
 
 ProtocolInfo protocol_info = 
 {
@@ -304,8 +302,6 @@
 	{MSG_WALLUSERS, TOK_WALLUSERS, m_wallusers, 0},
 	{MSG_WHOIS, TOK_WHOIS, m_whois, 0},
 	{MSG_ERROR, TOK_ERROR, _m_error, 0},
-	{"242", "242", m_numeric242, 0},
-	{"351", "351", m_numeric351, 0},
 	{0, 0, 0, 0},
 };
 
@@ -1095,16 +1091,6 @@
 	do_vhost( base64_to_nick( argv[0] ), argv[1] );
 }
 
-static void m_numeric242( char *origin, char **argv, int argc, int srv )
-{
-	_m_numeric242( base64_to_server( origin ), argv, argc, srv );
-}
-
-static void m_numeric351( char *origin, char **argv, int argc, int srv )
-{
-	_m_numeric351( base64_to_server( origin ), argv, argc, srv );
-}
-
 /* :<source> <command> <param1> <paramN> :<last parameter> */
 /* <source> <command> <param1> <paramN> :<last parameter> */
 int parse( void *notused, void *rline, size_t len )

Modified: trunk/src/protocol/nefarious.c
==============================================================================
--- trunk/src/protocol/nefarious.c	(original)
+++ trunk/src/protocol/nefarious.c	Tue Apr 19 07:09:58 2005
@@ -275,8 +275,6 @@
 static void m_whois( char *origin, char **argv, int argc, int srv );
 static void m_swhois( char *origin, char **argv, int argc, int srv );
 static void m_vhost( char *origin, char **argv, int argc, int srv );
-static void m_numeric242( char *origin, char **argv, int argc, int srv );
-static void m_numeric351( char *origin, char **argv, int argc, int srv );
 
 ProtocolInfo protocol_info = 
 {
@@ -348,8 +346,6 @@
 	{MSG_SWHOIS, TOK_SWHOIS, m_swhois, 0},
 	{MSG_FAKEHOST, TOK_FAKEHOST, m_vhost, 0},
 	{MSG_ERROR, TOK_ERROR, _m_error, 0},
-	{"242", "242", m_numeric242, 0},
-	{"351", "351", m_numeric351, 0},
 	{0, 0, 0, 0},
 };
 
@@ -1219,16 +1215,6 @@
 	do_vhost( base64_to_nick( argv[0] ), argv[1] );
 }
 
-static void m_numeric242( char *origin, char **argv, int argc, int srv )
-{
-	_m_numeric242( base64_to_server( origin ), argv, argc, srv );
-}
-
-static void m_numeric351( char *origin, char **argv, int argc, int srv )
-{
-	_m_numeric351( base64_to_server( origin ), argv, argc, srv );
-}
-
 /* :<source> <command> <param1> <paramN> :<last parameter> */
 /* <source> <command> <param1> <paramN> :<last parameter> */
 int parse( void *notused, void *rline, size_t len )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.