diff -r c490869ddaad doc/technical/protoctl.txt
--- a/doc/technical/protoctl.txt	Thu May 16 08:00:44 2013 +0000
+++ b/doc/technical/protoctl.txt	Thu May 16 02:20:38 2013 -0600
@@ -115,13 +115,6 @@
               is a server. See doc/technical/base64.txt for information on the base64
               system used.
 
-SJB64         This token allows timestamps to be specified in base64 notation to conserve
-              bandwidth. When SJB64 is supported, anywhere a timestamp can appear may be in
-              base64 notation. A base64 timestamp is preceeded by a ! to identify that it
-              is an sjb64 rather than a regular timestamp, if this is the case the
-              characters following the ! represent the timestamp in base64. See
-              doc/technical/base64.txt for information on the base64 system used. 
-              
 TKLEXT        This allows 10 instead of 8 parameters in TKL's for spamfilter, see s_kline.c
               function m_tkl for more info on this (added in 3.2RC2).
 
diff -r c490869ddaad doc/technical/serverprotocol.html
--- a/doc/technical/serverprotocol.html	Thu May 16 08:00:44 2013 +0000
+++ b/doc/technical/serverprotocol.html	Thu May 16 02:20:38 2013 -0600
@@ -71,8 +71,7 @@
 		<blockquote><blockquote><p><a href="#S8_1_3">8.1.3 SQLINE, UNSQLINE - Network-wide Nickname ban</a></p></blockquote></blockquote>
 		<blockquote><blockquote><p><a href="#S8_1_4">8.1.4 SPAMFILTER - Message Spam Filtration System</a></p></blockquote></blockquote>
 		<p><a href="#S9">9 Base64 Tables</a></p>
-		<blockquote><p><a href="#S9_1">9.1 Table for SJB64 (NICK and SJOIN).</a></p></blockquote>
-		<blockquote><p><a href="#S9_2">9.2 Table for NICKIP.</a></p></blockquote>
+		<blockquote><p><a href="#S9_1">9.1 Table for NICKIP.</a></p></blockquote>
 		<hr/>
 		<h1><a name="S1"></a>1 Introduction</h1>
 		<p>This document describes the UnrealIRCd server-to-server protocol.</p>
@@ -99,7 +98,6 @@
 			<li>VL : Supports V:Line information. Extends the SERVER message to include version information used in deny version{} blocks. Note that this is assumed - unreal will always send its own version information.</li>
 			<li>SJ3 : Supports SJOIN version 3.</li>
 			<li>NS : Supports server numerics which provides a shorthand for server names. In any circumstance where a :server.name is permitted (the server is the message's real source), @servernumeric may be used instead. In addition, the server.name parameter in the NICK message may be simply the server's numeric. Requires VL support.</li>
-			<li>SJB64 : Timestamps in NICK and SJOIN are expressed in base64 rather than base10.</li>
 			<li>TKLEXT : Supports exntended TKL messages for spamfilter support.</li>
 			<li>NICKIP : Adds an IP parameter to the NICK message, which is the base64 encoding of the user's ip address (in network byte order). Requires NICKv2.</li>
 			<li>NICKCHARS : Indicates the set of enabled nickchar options (see the regular documention for info about this).</li>
@@ -247,7 +245,7 @@
 		<p>These commands deal with the state of channels across the network. Unreal only supports Network Channels, where the first character is a # character.</p>
 		<h2><a name="S5_1"></a>5.1 SJOIN - Channel Burst (TOKEN: ~)</h2>
 		<p><b>Syntax:</b> <tt>@<i>servernumeric</i> ~ <i>timestamp</i> <i>channel</i> +<i>modes</i>[ <i>modeparams</i>] :<i>memberlist</i> <i>&amp;ban</i> <i>"exempt</i> <i>'invex</i></tt></p>
-		<p>Timestamp is the channel timestamp and can be !b64 as defined by PROTOCTL SJB64. Modes should only include those in the last three mode sets listed in CHANMODES. Modeparams is one parameter for each mode character that requires one. Memberlist is a series of users (all of which must at least be behind the server sending the SJOIN), each user is prefixed with one or more characters indicating their status. Owners (+q) are prefixed with *, admins (+a) ~, ops (+o) @, halfops (+h) %, voices (+v) +. Normal users are not prefixed with anything. Ban, ban exception, and invite exception masks are also included, with bans prefixed with &amp;, ban exceptions prefixed with ", and invite exceptions with '. Note that when a &amp;, " or ' is encountered as the first character, further processing of ~, *, @, %, or + characters must not continue because ban, exempt, and invite masks can contain any of those characters. (Plus it's just not right for a ban mask to be marked as a channel admin...)</p>
+		<p>Timestamp is the channel timestamp. Modes should only include those in the last three mode sets listed in CHANMODES. Modeparams is one parameter for each mode character that requires one. Memberlist is a series of users (all of which must at least be behind the server sending the SJOIN), each user is prefixed with one or more characters indicating their status. Owners (+q) are prefixed with *, admins (+a) ~, ops (+o) @, halfops (+h) %, voices (+v) +. Normal users are not prefixed with anything. Ban, ban exception, and invite exception masks are also included, with bans prefixed with &amp;, ban exceptions prefixed with ", and invite exceptions with '. Note that when a &amp;, " or ' is encountered as the first character, further processing of ~, *, @, %, or + characters must not continue because ban, exempt, and invite masks can contain any of those characters. (Plus it's just not right for a ban mask to be marked as a channel admin...)</p>
 		<p>If the channel didn't already exist it is created with the information given in the SJOIN. Otherwise the timestamp is used to determine how the SJOIN information is handled. As a given, all members are joined into the channel, regardless. The mode information (modes, modeparams, memberlist prefixes, bans, exempts, and invites) is subject to the timestamp rules:</p>
 		<ul>
 			<li>If the channel's current timestamp is equal to the timestamp in SJOIN, then the mode information is merged.</li>
@@ -421,28 +419,8 @@
 			<li>w (warn) - No action on the user is taken. Only the Spamfilter notice is sent to opers with snomask +S.</li>
 		</ul>
 		<h1><a name="S9">9 Base64 Tables</a></h1>
-		<p>Unreal uses base64 encoding to allow saving bandwidth by encoding numbers in a more compact format. Unreal uses two different variations of base64, one used for the SJB64 PROTOCTL option (in NICK and SJOIN), and one used for NICKIP.</p>
-		<h2><a name="S9_1">9.1 Table for SJB64 (NICK and SJOIN).</a></h2>
-		<p>In NICK and SJOIN, remember that the timestamp will be prefixed with ! to signal a base64 timestamp.</p>
-		<p>Just like in base10, the least significant &quot;digit&quot; is last.</p>
-		<pre> 0 0            17 H            34 Y            51 p
- 1 1            18 I            35 Z            52 q
- 2 2            19 J            36 a            53 r
- 3 3            20 K            37 b            54 s
- 4 4            21 L            38 c            55 t
- 5 5            22 M            39 d            56 u
- 6 6            23 N            40 e            57 v
- 7 7            24 O            41 f            58 w
- 8 8            25 P            42 g            59 x
- 9 9            26 Q            43 h            60 y
-10 A            27 R            44 i            61 z
-11 B            28 S            45 j            62 {
-12 C            29 T            46 k            63 }
-13 D            30 U            47 l
-14 E            31 V            48 m
-15 F            32 W            49 n
-16 G            33 X            50 o</pre>
-		<h2><a name="S9_2">9.2 Table for NICKIP.</a></h2>
+		<p>Historically, unreal used different base64 tables for sending NICK and SJOIN timestamps and sending NICKIP data.  Currently, base64 is used only to encode NICKIP.</p>
+		<h2><a name="S9_1">9.1 Table for NICKIP.</a></h2>
 		<p>In this table, the IP is encoded in network byte order. In terms of IPs, this means the first byte of the address really is first. Each &quot;digit&quot; in the base64 encoded IP corresponds to 6 bits of the IP address.</p>
 		<p>An IPv4 address is 32 bits, so 6 base64 &quot;digits&quot; are needed. Since base64 requires values to come in multiples of 4 &quot;digits&quot;, padding characters (=) need to be added if a value comes up short. In the case of IPv4 addresses, two are needed.</p>
 		<p>IPv6 addresses are 128-bit. They therefore need 22 base64 &quot;digits&quot; plus 2 pad characters.</p>
diff -r c490869ddaad extras/burst.c
--- a/extras/burst.c	Thu May 16 08:00:44 2013 +0000
+++ b/extras/burst.c	Thu May 16 02:20:38 2013 -0600
@@ -229,7 +229,7 @@
   char passphrase[MYBUFSIZE];
   robotptr->socket=create_client(uplinkservername, atol(jupereason));
   sprintf(passphrase,
-	  "PROTOCTL %s %s %s %s %s %s %s %s %s\r\n", 
+	  "PROTOCTL %s %s %s %s %s %s %s %s\r\n", 
 	  	(options & 0x1) ? "NOQUIT" : "",
 	  	(options & 0x2) ? "TOKEN" : "",
 	  	(options & 0x4) ? "NICKv2" : "",
@@ -238,7 +238,6 @@
 	  	(options & 0x20) ? "UMODE2" : "",
 	  	(options & 0x40) ? "NS" : "",
 	  	(options & 0x100) ? "SJ3" : "",
-	  	(options & 0x200) ? "SJB64" : "");
   write(robotptr->socket, passphrase, strlen(passphrase));
   sprintf(passphrase, "PASS %s\r\nSERVER %s 1 :[Burst analysis].\r\n",
 	  password,jupedservername);
@@ -266,7 +265,7 @@
     fprintf(stderr, "3 = Enable NICKv2  4 = Enable SJOIN\n");
     fprintf(stderr, "5 = Enable SJOIN2  6 = Enable UMODE2\n");
     fprintf(stderr, "7 = Enable NS      8 = Ignore end of burst\n");
-    fprintf(stderr, "9 = Enable SJ3     a = Enable SJB64\n");
+    fprintf(stderr, "9 = Enable SJ3\n");
     fatal("incorrect argument count");
     exit(1);
   }
@@ -296,8 +295,6 @@
 		options |= 0x80;
 	if (*p == '9')
 		options |= 0x100;
-	if (*p == 'a')
-		options |= 0x200;
   }
   /* installe le signal_catcher */
   signal(SIGTERM,(signalhandler)signal_catcher);
diff -r c490869ddaad include/common.h
--- a/include/common.h	Thu May 16 08:00:44 2013 +0000
+++ b/include/common.h	Thu May 16 02:20:38 2013 -0600
@@ -268,7 +268,6 @@
                         " UMODE2" \
                         " VL" \
                         " SJ3" \
-                        " SJB64" \
                         " TKLEXT" \
                         " NICKIP" \
                         " ESVID"
diff -r c490869ddaad include/struct.h
--- a/include/struct.h	Thu May 16 08:00:44 2013 +0000
+++ b/include/struct.h	Thu May 16 02:20:38 2013 -0600
@@ -282,8 +282,8 @@
 #define OPT_NOT_UMODE2	0x0080
 #define OPT_SJ3		0x0100
 #define OPT_NOT_SJ3	0x0200
-#define OPT_SJB64	0x0400
-#define OPT_NOT_SJB64	0x0800
+//0x0400 unused (was OPT_SJB64)
+//0x0800 unused (was OPT_NOT_SJB64)
 #define OPT_VHP		0x1000
 #define OPT_NOT_VHP	0x2000
 #define OPT_TKLEXT	0x4000
@@ -352,7 +352,7 @@
 #define PROTO_VL		0x0100	/* Negotiated VL protocol */
 #define PROTO_SJ3		0x0200	/* Negotiated SJ3 protocol */
 #define PROTO_VHP		0x0400	/* Send hostnames in NICKv2 even if not sethosted */
-#define PROTO_SJB64		0x0800
+//0x0800 unused (was PROTO_SJB64)
 #define PROTO_TKLEXT	0x1000	/* TKL extension: 10 parameters instead of 8 (3.2RC2) */
 #define PROTO_NICKIP	0x2000  /* Send IP addresses in the NICK command */
 #define PROTO_NAMESX	0x4000  /* Send all rights in NAMES output */
diff -r c490869ddaad src/modules/m_join.c
--- a/src/modules/m_join.c	Thu May 16 08:00:44 2013 +0000
+++ b/src/modules/m_join.c	Thu May 16 02:20:38 2013 -0600
@@ -342,11 +342,7 @@
 		/* I _know_ that the "@%s " look a bit wierd
 		   with the space and all .. but its to get around
 		   a SJOIN bug --stskeeps */
-		sendto_serv_butone_token_opt(cptr, OPT_SJ3|OPT_SJB64,
-			me.name, MSG_SJOIN, TOK_SJOIN,
-			"%B %s :%s%s ", (long)chptr->creationtime, 
-			chptr->chname, chfl_to_sjoin_symbol(flags), sptr->name);
-		sendto_serv_butone_token_opt(cptr, OPT_SJ3|OPT_NOT_SJB64,
+		sendto_serv_butone_token_opt(cptr, OPT_SJ3,
 			me.name, MSG_SJOIN, TOK_SJOIN,
 			"%li %s :%s%s ", chptr->creationtime, 
 			chptr->chname, chfl_to_sjoin_symbol(flags), sptr->name);
diff -r c490869ddaad src/modules/m_nick.c
--- a/src/modules/m_nick.c	Thu May 16 08:00:44 2013 +0000
+++ b/src/modules/m_nick.c	Thu May 16 02:20:38 2013 -0600
@@ -118,7 +118,7 @@
 	aClient *acptrs;
 	char nick[NICKLEN + 2], *s, descbuf[BUFSIZE];
 	Membership *mp;
-	time_t lastnick = (time_t) 0;
+	long lastnick = 0l;
 	int  differ = 1, update_watch = 1;
 	unsigned char newusr = 0, removemoder = 1;
 	/*
@@ -449,7 +449,7 @@
 		 */
 		if (parc > 3)
 		{
-			lastnick = TS2ts(parv[3]);
+			lastnick = atol(parv[3]);
 			if (parc > 5)
 				differ = (mycmp(acptr->user->username, parv[4])
 				    || mycmp(acptr->user->realhost, parv[5]));
@@ -522,7 +522,7 @@
 		   ** A NICK change has collided (e.g. message type ":old NICK new").
 		 */
 		if (parc > 2)
-			lastnick = TS2ts(parv[2]);
+			lastnick = atol(parv[2]);
 		differ = (mycmp(acptr->user->username, sptr->user->username) ||
 		    mycmp(acptr->user->realhost, sptr->user->realhost));
 		sendto_failops
@@ -597,9 +597,9 @@
 		sptr = make_client(cptr, serv);
 		add_client_to_list(sptr);
 		if (parc > 2)
-			sptr->hopcount = TS2ts(parv[2]);
+			sptr->hopcount = atol(parv[2]);
 		if (parc > 3)
-			sptr->lastnick = TS2ts(parv[3]);
+			sptr->lastnick = atol(parv[3]);
 		else		/* Little bit better, as long as not all upgraded */
 			sptr->lastnick = TStime();
 		if (sptr->lastnick < 0)
@@ -678,9 +678,9 @@
 		if (mycmp(parv[0], nick) ||
 		    /* Next line can be removed when all upgraded  --Run */
 		    (!MyClient(sptr) && parc > 2
-		    && TS2ts(parv[2]) < sptr->lastnick))
+		    && atol(parv[2]) < sptr->lastnick))
 			sptr->lastnick = (MyClient(sptr)
-			    || parc < 3) ? TStime() : TS2ts(parv[2]);
+			    || parc < 3) ? TStime() : atol(parv[2]);
 		if (sptr->lastnick < 0)
 		{
 			sendto_realops("Negative timestamp (%s)", backupbuf);
diff -r c490869ddaad src/modules/m_protoctl.c
--- a/src/modules/m_protoctl.c	Thu May 16 08:00:44 2013 +0000
+++ b/src/modules/m_protoctl.c	Thu May 16 02:20:38 2013 -0600
@@ -266,20 +266,6 @@
 			    proto, cptr->name));
 			SetSJ3(cptr);
 		}
-		else if (strcmp(s, "SJB64") == 0)
-		{
-#ifndef PROTOCTL_MADNESS
-			if (remove)
-			{
-				cptr->proto &= ~PROTO_SJB64;
-				continue;
-			}
-#endif
-			Debug((DEBUG_ERROR,
-			    "Chose protocol %s for link %s",
-			    proto, cptr->name));
-			cptr->proto |= PROTO_SJB64;
-		}
 		else if (strcmp(s, "TKLEXT") == 0)
 		{
 			Debug((DEBUG_ERROR, "Chose protocol %s for link %s", proto, cptr->name));
diff -r c490869ddaad src/modules/m_server.c
--- a/src/modules/m_server.c	Thu May 16 08:00:44 2013 +0000
+++ b/src/modules/m_server.c	Thu May 16 02:20:38 2013 -0600
@@ -732,10 +732,7 @@
 			if (!SupportVHP(cptr))
 			{
 				sendto_one(cptr,
-					    (cptr->proto & PROTO_SJB64 ?
-					    "NICK %s %d %B %s %s %s %s %s %s %s%s%s%s:%s"
-					    :
-					    "NICK %s %d %lu %s %s %s %s %s %s %s%s%s%s:%s"),
+					    "NICK %s %d %lu %s %s %s %s %s %s %s%s%s%s:%s",
 					    acptr->name,
 					    acptr->hopcount + 1,
 					    (long)acptr->lastnick,
@@ -796,10 +793,7 @@
 				send_channel_modes_sjoin3(cptr, chptr);
 			if (chptr->topic_time)
 				sendto_one(cptr,
-				    (cptr->proto & PROTO_SJB64 ?
-				    "TOPIC %s %s %B :%s"
-				    :
-				    "TOPIC %s %s %lu :%s"),
+				    "TOPIC %s %s %lu :%s",
 				    chptr->chname, chptr->topic_nick,
 				    (long)chptr->topic_time, chptr->topic);
 		}
@@ -992,7 +986,7 @@
 	/* send MLOCK here too... --nenolod */
 	if (CHECKPROTO(cptr, PROTO_MLOCK))
 	{
-		sendto_one(cptr, (CHECKPROTO(cptr, PROTO_SJB64) ? "MLOCK %B %s :%s" : "MLOCK %lu %s :%s"),
+		sendto_one(cptr, "MLOCK %lu %s :%s",
 			   chptr->creationtime, chptr->chname,
 			   BadPtr(chptr->mode_lock) ? "" : chptr->mode_lock);
 	}
@@ -1275,19 +1269,19 @@
 	if (nomode && nopara)
 	{
 		ircsprintf(buf,
-		    (cptr->proto & PROTO_SJB64 ? ":%s SJOIN %B %s :" : ":%s SJOIN %ld %s :"), me.name,
+		    ":%s SJOIN %ld %s :", me.name,
 		    (long)chptr->creationtime, chptr->chname);
 	}
 	if (nopara && !nomode)
 	{
 		ircsprintf(buf, 
-		    (cptr->proto & PROTO_SJB64 ? ":%s SJOIN %B %s %s :" : ":%s SJOIN %ld %s %s :"), me.name,
+		    ":%s SJOIN %ld %s %s :", me.name,
 		    (long)chptr->creationtime, chptr->chname, modebuf);
 	}
 	if (!nopara && !nomode)
 	{
 		ircsprintf(buf,
-		    (cptr->proto & PROTO_SJB64 ? ":%s SJOIN %B %s %s %s :" : ":%s SJOIN %ld %s %s %s :"), me.name,
+		    ":%s SJOIN %ld %s %s %s :", me.name,
 		    (long)chptr->creationtime, chptr->chname, modebuf, parabuf);
 	}
 
diff -r c490869ddaad src/modules/m_sjoin.c
--- a/src/modules/m_sjoin.c	Thu May 16 08:00:44 2013 +0000
+++ b/src/modules/m_sjoin.c	Thu May 16 02:20:38 2013 -0600
@@ -232,10 +232,7 @@
 	}
 	chptr = get_channel(cptr, parv[2], CREATE);
 
-	if (*parv[1] != '!')
-		ts = (time_t)atol(parv[1]);
-	else
-		ts = (time_t)base64dec(parv[1] + 1);
+	ts = (time_t)atol(parv[1]);
 
 	if (chptr->creationtime > ts)
 	{
@@ -882,14 +879,10 @@
 		return -1;
 	}
 	/* This sends out to SJ3 servers .. */
-	Debug((DEBUG_DEBUG, "Sending '%li %s :%s' to sj3-!sjb64", ts, parabuf,
+	Debug((DEBUG_DEBUG, "Sending '%li %s :%s' to sj3", ts, parabuf,
 	    parv[parc - 1]));
-	sendto_serv_butone_token_opt(cptr, OPT_SJOIN | OPT_SJ3 | OPT_NOT_SJB64, sptr->name,
+	sendto_serv_butone_token_opt(cptr, OPT_SJOIN | OPT_SJ3, sptr->name,
 	    MSG_SJOIN, TOK_SJOIN, "%li %s :%s", ts, parabuf, parv[parc - 1]);
-	Debug((DEBUG_DEBUG, "Sending '%B %s :%s' to sj3-sjb64", (long)ts, parabuf,
-	    parv[parc - 1]));
-	sendto_serv_butone_token_opt(cptr, OPT_SJOIN | OPT_SJ3 | OPT_SJB64, sptr->name,
-	    MSG_SJOIN, TOK_SJOIN, "%B %s :%s", (long)ts, parabuf, parv[parc - 1]);
 	 
 	return 0;
 }
diff -r c490869ddaad src/send.c
--- a/src/send.c	Thu May 16 08:00:44 2013 +0000
+++ b/src/send.c	Thu May 16 02:20:38 2013 -0600
@@ -618,10 +618,6 @@
 			continue;
 		if ((opt & OPT_SJ3) && !SupportSJ3(cptr))
 			continue;
-		if ((opt & OPT_SJB64) && !(cptr->proto & PROTO_SJB64))
-			continue;
-		if ((opt & OPT_NOT_SJB64) && (cptr->proto & PROTO_SJB64))
-			continue;
 		if ((opt & OPT_VHP) && !(cptr->proto & PROTO_VHP))
 			continue;
 		if ((opt & OPT_NOT_VHP) && (cptr->proto & PROTO_VHP))
