*
*/
-/* $Id: config.h,v 1.2 2005/01/13 06:20:44 mmondor Exp $ */
+/* $Id: config.h,v 1.3 2005/01/13 06:21:17 mmondor Exp $ */
#ifndef __config_include__
#define __config_include__
*/
#undef DCCALLOW
+/* COLORED_NICKS
+ * Allow ^C character in nicks to facilitate IRC colors
+ */
+#define COLORED_NICKS
+
/******************************************************************
* STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP
*
*
*/
-/* $Id: struct.h,v 1.3 2005/01/13 06:20:44 mmondor Exp $ */
+/* $Id: struct.h,v 1.4 2005/01/13 06:21:18 mmondor Exp $ */
#ifndef __struct_include__
#define __struct_include__
#define BadPtr(x) (!(x) || (*(x) == '\0'))
+#ifdef COLORED_NICKS
+#define isvalid(c) (((c) >= 'A' && (c) < '~') || (c) == '\003' || IsDigit(c) || (c) == '-')
+#else
#define isvalid(c) (((c) >= 'A' && (c) < '~') || IsDigit(c) || (c) == '-')
+#endif
#define MyConnect(x) ((x)->fd >= 0)
#define MyClient(x) (MyConnect(x) && IsClient(x))
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: m_nick.c,v 1.1 2005/01/12 07:44:56 mmondor Exp $ */
+/* $Id: m_nick.c,v 1.2 2005/01/13 06:21:18 mmondor Exp $ */
#include "struct.h"
#include "common.h"
me.name, parv[0]);
return 0;
}
+
+#ifdef COLORED_NICKS
+ {
+ char *p;
+ if ( (p = strrchr(parv[1], '\003')) && ((p[1] >= '0') && (p[1] <= '9')) )
+ {
+ int n = strlen(parv[1]);
+ parv[1][ (n < NICKLEN) ? n : NICKLEN ] = '\003';
+ }
+ }
+#endif
if (!IsServer(sptr) && IsServer(cptr) && parc > 2)
newts = atol(parv[2]);