Gopher Menu

       Talking to a gopher server in mIRC script
       April 06th, 2018
       Using gopher in an mIRC script is darn easy... Here is an example 
       script that could be put into the bot to connect to a gopher-based 
       spell checking service...
       Lets start by creating an alias that will close any stale sockets and
       open a new TCP socket to a gopher server when called... in mIRC
       scripting it could be done like so:
       alias aspell {
         sockClose aspell
         sockOpen aspell 70
       Now lets set mIRC to listen for spell check requests when a user sends
       ``!spell someword'' to the channel:
       on *:TEXT:*:#: {
         if ( $1 == !spell ) {
           if ( $2 != $null ) {
             set %aspellchan $chan
             set %aspellreq $2
           aspell }
       Take our user's request and send it into the newly opened socket:
       on *:SockOpen:aspell: {
         sockwrite -nt aspell /aspell/plain.mole? $+ %aspellreq
         sockwrite -nt aspell $crlf
       And finally, read the reply from the gopher server:
       on *:sockread:aspell:{
         if ($sockerr > 0) return
         while (1) {
           sockread %readaspell
           if ($sockbr == 0) return
           msg %aspellchan %readaspell
       My mIRC scripting isn't the best, but the example works just fine, you
       can see it in action in a few channels on UnderNet (/whois Rasalhague)
       or freenode (try #gopherproject or #devious)... The bot will respond 
       to !spell