--- /home/gallows/Desktop/nicotine+/pynicotine/gtkgui/privatechat.py	2007-05-08 16:29:55.000000000 +0200
+++ privatechat.py	2007-05-08 16:38:04.000000000 +0200
@@ -177,7 +177,7 @@
 			f.close()
 			s = d.split("\n")
 			for l in s[-8:-1]:
-				AppendLine(self.ChatScroll, l + "\n", self.tag_hilite, "", username=self.user, usertag=self.tag_username)
+				AppendLine(self.ChatScroll, l + "\n", self.tag_hilite, "", username=self.user, usertag=self.tag_hilite)
 		except IOError, e:
 			pass
 
@@ -251,7 +251,7 @@
 			
 
 	def SendMessage(self, text):
-
+		
 		if text[:4] == "/me ":
 			line = "* %s %s" % (self.frame.np.config.sections["server"]["login"], text[4:])
 			tag = self.tag_me
@@ -262,10 +262,15 @@
 			else:
 				line = text
 			tag = self.tag_local
+
+		my_username = self.frame.np.config.sections["server"]["login"]
+		if text[:4] == "/me ":
+			AppendLine(self.ChatScroll, self.frame.np.decode(line, self.encoding), tag, "%c", username=my_username, usertag=self.tag_me)
+		else:
+			AppendLine(self.ChatScroll, '[' + my_username + "] " + self.frame.np.decode(line, self.encoding), tag, "%c", username=my_username, usertag=self.tag_my_username)
 			
-		AppendLine(self.ChatScroll, self.frame.np.decode(line, self.encoding), tag, "%c", username=self.user, usertag=self.tag_username)
 		if self.Log.get_active():
-			self.logfile = WriteLog(self.logfile, self.frame.np.config.sections["logging"]["logsdir"], self.user, line)
+			self.logfile = WriteLog(self.logfile, self.frame.np.config.sections["logging"]["logsdir"], self.user, '[' + my_username + "] " + line)
 		
 		if self.PeerPrivateMessages.get_active():
 			# not in the soulseek protocol
@@ -273,7 +278,7 @@
 		else:
 			self.frame.np.queue.put(slskmessages.MessageUser(self.user, text))
 	CMDS = ["/alias ", "/unalias ", "/whois ", "/browse ", "/ip ", "/pm ", "/msg ", "/search ", "/usearch ", "/rsearch ",
-		"/bsearch ", "/add ", "/buddy ", "/rem ", "/unbuddy ", "/ban ", "/ignore ", "/unban ", "/unignore ", "/clear", "/quit", "/rescan", "/nsa", "/info", "/ctcpversion"]
+		"/bsearch ", "/add ", "/buddy ", "/rem ", "/unbuddy ", "/ban ", "/ignore ", "/unban ", "/unignore ", "/clear", "/quit", "/rescan", "/nsa", "/info", "/ctcpversion", "/join"]
 
 	def OnEnter(self, widget):
 		text = self.frame.np.encode(widget.get_text(), self.encoding)
@@ -375,6 +380,8 @@
 				self.SendMessage(np)
 		elif cmd == "/rescan":
 			self.frame.OnRescan()
+		elif cmd in ["/join", "/j"]:
+			self.frame.np.queue.put(slskmessages.JoinRoom(args))
 		elif cmd and cmd[:1] == "/" and cmd != "/me" and cmd[:2] != "//":
 			self.frame.logMessage(_("Command %s is not recognized") % text)
 			return
@@ -417,19 +424,31 @@
 			statuscolor = "useroffline"
 	
 		self.tag_username = self.makecolour(buffer, statuscolor)
+		if self.frame.away:
+			self.tag_my_username = self.makecolour(buffer, "useraway")
+		else:
+			self.tag_my_username = self.makecolour(buffer, "useronline")
+
 		usernamestyle = self.frame.np.config.sections["ui"]["usernamestyle"]
 		if usernamestyle == "bold":
 			self.tag_username.set_property("weight",  pango.WEIGHT_BOLD)
+			self.tag_my_username.set_property("weight",  pango.WEIGHT_BOLD)
 		else:
 			self.tag_username.set_property("weight",  pango.WEIGHT_NORMAL)
+			self.tag_my_username.set_property("weight",  pango.WEIGHT_NORMAL)			
 		if usernamestyle == "italic":
 			self.tag_username.set_property("style",  pango.STYLE_ITALIC)
+			self.tag_my_username.set_property("style",  pango.STYLE_ITALIC)			
 		else:
 			self.tag_username.set_property("style",  pango.STYLE_NORMAL)
+			self.tag_my_username.set_property("style",  pango.STYLE_NORMAL)			
 		if usernamestyle == "underline":
 			self.tag_username.set_property("underline", pango.UNDERLINE_SINGLE)
+			self.tag_my_username.set_property("underline", pango.UNDERLINE_SINGLE)			
 		else:
 			self.tag_username.set_property("underline", pango.UNDERLINE_NONE)
+			self.tag_my_username.set_property("underline", pango.UNDERLINE_NONE)
+			
 		self.frame.SetTextBG(self.ChatScroll)
 		self.frame.SetTextBG(self.ChatLine)
 		
@@ -472,8 +491,14 @@
 		self.changecolour(self.tag_hilite, "chathilite")
 		color = self.getUserStatusColor(self.status)
 		self.changecolour(self.tag_username, color)
+
 		self.frame.SetTextBG(self.ChatScroll)
 		self.frame.SetTextBG(self.ChatLine)
+
+		if self.frame.away:
+			self.changecolour(self.tag_my_username, "useraway")
+		else:
+			self.changecolour(self.tag_my_username, "useronline")
 		
 	def getUserStatusColor(self, status):
 		if status == 1:
@@ -488,13 +513,12 @@
 		if status == self.status:
 			return
 		
-		
 		self.status = status
 
 		color = self.getUserStatusColor(self.status)
 
 		self.changecolour(self.tag_username, color)
-		
+
 		#line = "* " + ["User %s is offline", "User %s is away", "User %s is online"][status] % self.user
 		#AppendLine(self.ChatScroll, line, self.tag_hilite, "%c")
 	
@@ -530,6 +554,7 @@
 			widget.insert_text(completion, ix)
 			widget.set_position(ix + len(completion))
 		widget.emit_stop_by_name("key_press_event")
+
 		return True
 
 	def OnLogToggled(self, widget):
