shithub: irc.myr

Download patch

ref: 8d6c1b01c6e17894cb1054d954d18272e71e5aae
parent: e2f5f21134596e13775081de13c9dfafaab3622e
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Oct 17 19:30:42 EDT 2019

\r\n in ping.

--- a/irc.myr
+++ b/irc.myr
@@ -372,6 +372,7 @@
 		| `std.Some srv:
 			n = &srv.nick
 			s = srv.ds
+			send(irc, srv, "NICK {}\r\n", args[0])
 		| `std.None:
 			n = &irc.nick
 			s = "default"
@@ -381,6 +382,7 @@
 		| `std.Some srv:
 			n = &srv.nick
 			s = srv.ds
+			send(irc, srv, "NICK {}\r\n", args[0])
 		| `std.None:
 			status(irc, irc.self, "no server '{}'", args[2])
 			-> void
@@ -390,10 +392,8 @@
 		-> void
 	;;
 
-
 	std.slfree(n#)
 	n# = std.sldup(args[0])
-	send(irc, srv, "NICK {}\r\n", srv.user)
 	status(irc, irc.self, "{} changed to {}", s, n#)
 }
 
--- a/main.myr
+++ b/main.myr
@@ -54,7 +54,7 @@
 const ping = {irc
 	for s : irc.srv
 		if s.death == 0 && (std.now() - s.ping) > 60*std.Sec
-			send(irc, s, "PING irc.myr")
+			send(irc, s, "PING irc.myr\r\n")
 			/* let's not flood */
 			s.ping = std.now()
 		;;
--