class OutputHandler(object):
    def __init__(self, connection):
        self.connection = connection

    def cmdNICK(self, nick):
        self.connection.sendMessage("NICK", nick)

    def cmdUSER(self, ident, gecos):
        # RFC2812 allows usermodes to be set, but this isn't implemented much in IRCds at all.
        # Pass 0 for usermodes instead.
        self.connection.sendMessage("USER", ident, "0", "*", ":{}".format(gecos))

    def cmdQUIT(self, reason):
        self.connection.sendMessage("QUIT", ":{}".format(reason))

@@ -176,16 +176,114 @@
  nick)%0A%0A
+    def cmdQUIT(self, reason):%0A        self.connection.sendMessage(%22QUIT%22, %22:%7B%7D%22.format(reason))%0A%0A
     def 
@@ -532,102 +532,4 @@
 s))%0A
-%0A    def cmdQUIT(self, reason):%0A        self.connection.sendMessage(%22QUIT%22, %22:%7B%7D%22.format(reason))%0A

Put commands in alphabetical order for my own sanity