Jump to content

Recommended Posts

Posted

Avaible Commands:

 

rcon.Start

/rcon.password <Rcon password of the server>

/rcon.challenge <Ip From Server> <Port From Server>

/rcon.logs To see server logs

/rcon <Rcon Command>

/rcon.steamid < lookup for user with steam id >

/rcon.Help For Help

 

Sorry for the doublepost but the code is too big

First part:

on *:load:{

 echo -s mIRCon

 echo -s mirc rcon for half-life servers (with cs scorebot)

 echo -s -

 echo -s usage:

 echo -s -

 echo -s 1: select rcon console from the popups menu

 echo -s 2: type /rcon.password RCONPASSWORDHERE

 echo -s 3: type /rcon.challenge IPHERE PORTHERE

 echo -s 4: If you want to see the logs, type /rcon.logs

 echo -s 5: type /rcon COMMANDHERE

 echo -s -

 echo -s You can also lookup steamids using /rcon.steamid STEAMID

 echo -s example: /rcon.steamid 12345

 echo -s -

 echo -s troubleshooting:

 echo -s -

 echo -s check for any error messages in the rcon window

 echo -s If you try to access a server with the wrong information too many times you could be IP banned.

 echo -s type /rcon.help for more information

 set %rcon.says 0

 set %rcon.scorebot 0

 set %rcon.myip $ip

}



on *:unload:{

 unset %rcon.*

}



menu status,channel,query,menubar,@rcon {

 -

 mIRCon

 .RCON Console:{

   if (!$window(@rcon)) {

     window -e @rcon

     aline @rcon mirc rcon for half-life servers

     aline @rcon -

     aline @rcon usage:

     aline @rcon -

     aline @rcon 1: type /rcon.password RCON PASS

     aline @rcon 2: type /rcon.challenge IP PORT

     aline @rcon 3: If you want to see the logs, type /rcon.logs

     aline @rcon 4: type /rcon kick
     aline @rcon -

     aline @rcon You can also lookup steamids using /rcon.steamid STEAMID

     aline @rcon example: /rcon.steamid 12345

     aline @rcon -

     aline @rcon troubleshooting:

     aline @rcon -

     aline @rcon check for any error messages in this window

     aline @rcon If you try to access a server with the wrong information too many times you could be IP banned.

     aline @rcon type /rcon.help for more information

     aline @rcon ------------------------------------------------------------------------------------------------

   }

   else {

     echo -a The RCON window is already open!

   }

 }

 .Scorebot

 ..$iif(%rcon.says == 1,Turn say's/say_team's off,Turn say's/say_team's on):$iif(%rcon.says == 1,set %rcon.says 0,set %rcon.says 1)

 ..$iif(%rcon.scorebot == 1, Stop, Start) Scorebot:$iif(%rcon.scorebot == 1, stopscorebot, scorebot)

 -

}



alias rcon.help {

 aline -p @rcon *** HELP ------------

 aline -p @rcon -

 aline -p @rcon /rcon.password

 aline -p @rcon By typing this, it will save your rcon password.

 aline -p @rcon FORMAT: /rcon.password rconpassword

 aline -p @rcon -

 aline -p @rcon /rcon.challenge

 aline -p @rcon In order to use rcon commands, you need a number sent from the server, the challenge number. An IP is required, if no port is given then the default port of 27015 is used.

 aline -p @rcon FORMAT: /rcon.password serverip serverport

 aline -p @rcon -

 aline -p @rcon /rcon.logs

 aline -p @rcon After you did /rcon.challenge and /rcon.password, you can see the live logs of the server by typing this.

 aline -p @rcon -

 aline -p @rcon /rcon

 aline -p @rcon You can perform any rcon command by using this, you must do /rcon.challenge and /rcon.password before doing this. Too many bad attempts may result in your ip getting banned from the server.

 aline -p @rcon FORMAT: /rcon commandhere

 aline -p @rcon -

 aline -p @rcon *** HELP ------------

}


alias rcon.start
if (!$window(@rcon)) {

     window -e @rcon

     aline @rcon mirc rcon for half-life servers

     aline @rcon -

     aline @rcon usage:

     aline @rcon -

     aline @rcon 1: type /rcon.password RCON PASS

     aline @rcon 2: type /rcon.challenge IP PORT

     aline @rcon 3: If you want to see the logs, type /rcon.logs

     aline @rcon 4: type /rcon kick
     aline @rcon -

     aline @rcon You can also lookup steamids using /rcon.steamid STEAMID

     aline @rcon example: /rcon.steamid 12345

     aline @rcon -

     aline @rcon troubleshooting:

     aline @rcon -

     aline @rcon check for any error messages in this window

     aline @rcon If you try to access a server with the wrong information too many times you could be IP banned.

     aline @rcon type /rcon.help for more information

     aline @rcon 
   }

   else {

     echo -a The RCON window is already open!

   }

 }
}


alias rcon.password {

 if ($window(@rcon)) {

   if (!$1) {

     aline @rcon You need to enter an rcon password.

     aline @rcon The format is: /rcon.password password

     halt

   }

   set %rcon.password $1-

   aline @rcon the rcon password has been saved as " $+ $1- $+ "

   else {

     echo -a The RCON window is not open! Select it from the popup menu.

   }

 }

}



alias rcon.challenge {

 if ($window(@rcon)) {

   if (!$1) {

     aline @rcon You need to enter an ip address

     aline @rcon The format is: /rcon.challenge 123.456.789.012 27015

     aline @rcon the first set of numbers is the ip, the second set of numbers is the port

     halt

   }

   if (!$2) {

     set %rcon.ip $1

     set %rcon.port 27015

   }

   else {

     set %rcon.ip $1

     set %rcon.port $2

   }

   sockudp -kn rcon.cmd %rcon.ip %rcon.port challenge rcon

 }

 else {

   echo -a The RCON window is not open! Select it from the popup menu.

 }

}



alias rcon.logs {

 if ($window(@rcon)) {

   if ((!%rcon.ip) || (!%rcon.port) || (!%rcon.challengenumber) || (!%rcon.password)) {
     #
     aline @rcon some vital components are missing, please make sure the ip, port, challenegenumber, and rcon password all exist.

   }

   else {

     ; enable server log stuff

     sockudp -kn rcon.cmd %rcon.ip %rcon.port rcon %rcon.challengenumber " $+ %rcon.password $+ " mp_logmessages 1

     sockudp -kn rcon.cmd %rcon.ip %rcon.port rcon %rcon.challengenumber " $+ %rcon.password $+ " mp_logfile 1

     sockudp -kn rcon.cmd %rcon.ip %rcon.port rcon %rcon.challengenumber " $+ %rcon.password $+ " mp_logdetail 0

     ; enable logging

     sockudp -kn rcon.cmd %rcon.ip %rcon.port rcon %rcon.challengenumber " $+ %rcon.password $+ " log on

     ; set log address

     set %rcon.myip $ip

     sockudp -k rcon 7130 %rcon.ip %rcon.port rcon %rcon.challengenumber " $+ %rcon.password $+ " logaddress_add %rcon.myip 7130

   }

 }

 else {

   echo -a The RCON window is not open! Select it from the popup menu.

 }

}



alias rcon {

 if ($window(@rcon)) {

   if ((!%rcon.ip) || (!%rcon.port) || (!%rcon.challengenumber) || (!%rcon.password)) {

     aline @rcon some vital components are missing, please make sure the ip, port, challenegenumber, and rcon password all exist.

   }

   else {

     sockudp -kn rcon.cmd %rcon.ip %rcon.port rcon %rcon.challengenumber " $+ %rcon.password $+ " $1-

   }

 }

 else {

   echo -a The RCON window is not open! Select it from the popup menu.

 }

}



alias scorebot {

 if ($window(@rcon)) {

   if ((!%rcon.ip) || (!%rcon.port) || (!%rcon.challengenumber) || (!%rcon.password)) {

     aline @rcon some vital components are missing, please make sure the ip, port, challenegenumber, and rcon password all exist.

   }

   else {

     set %rcon.scorebotchan $input(What channel do you want the scorebot in?,ey)

     if (%rcon.scorebotchan == $null) {

       set %rcon.scorebot 0

       echo -a *** You must provide a channel name!

     }

     else {

       if ($left(%rcon.scorebotchan,1) != $chr(35)) {

         set %rcon.scorebot $chr(35) $+ %rcon.scorebot

       }

       if ($me ison %rcon.scorebotchan) {

         set %rcon.scorebot 1



       }

       else {

         join %rcon.scorebotchan



         set %rcon.scorebot 1

       }     

     }

   }

 }

 else {

   echo -a The RCON window is not open! Select it from the popup menu, then run the scorebot.

 }

}



alias stopscorebot {

 if (%rcon.scorebot == 1) {

   set %rcon.scorebot 0

   if (%rcon.scorebotchan) {

     if ($me ison %rcon.scorebotchan) {



       unset %rcon.scorebotchan

     }

     else {

       unset %rcon.scorebotchan

     }

   }

 }

 else {

   echo -a *** The scorebot is not running!

 }

}



on *:udpread:rcon.cmd:{

 if ($window(@rcon)) {

   if ($sockerr > 0) {

     return

   }

   :nextread

   sockread -f %rcon.cmd

   if ($sockbr == 0) {

     return

   }

Posted

Second part:

 }

    if (%rcon.cmd == $null) {

      goto nextread

    }

    else {

      if ($gettok(%rcon.cmd,1,32) == challenge) {

        set %rcon.challengenumber $gettok(%rcon.cmd,3,32)

      }

      if ($left(%rcon.cmd,5) == l) {

        %rcon.cmd = $remove(%rcon.cmd,$left(%rcon.cmd,5))

        if (%rcon.cmd == $null) {

        }

      }

    } 

    if (%rcon.cmd == $null) {

      goto nextread

    }

    if (map isin %rcon.cmd) { set %map $gettok(%rcon.cmd,3,32) }

    if (players isin %rcon.cmd) { set %players $gettok(%rcon.cmd,3,32) }

    if (sv_password isin %rcon.cmd) { set %password $gettok(%rcon.cmd,3,32) | msg #gatherfreaks [ip: $+ %rcon.ip : %rcon.port $+ ][Players: $+ %players $+ /12][Map: $+ %map $+ ][Password: $+ %password $+ ] }

    goto nextread

  }

}



on *:udpread:rcon:{

  if ($sockerr > 0) {

    return

  }

  :nextread

  sockread -f %rcon.data

  if ($sockbr == 0) {

    return

  }

  if (%rcon.data == $null) {

    goto nextread

  }

  else {

    if (*"*from*"*"* iswm %rcon.data) {

      %rcon.data = $null

    }

    if ($gettok(%rcon.data,1,32) == challenge) {

      set %rcon.challengenumber $gettok(%rcon.data,3,32)

    }

    if ($left(%rcon.data,5) == l) {

      %rcon.data = $remove(%rcon.data,$left(%rcon.data,5))

      if ((*sv_* !iswm %rcon.data) || (*mp_* !iswm %rcon.data)) {

        %rcon.data = $gettok(%rcon.data,6- $+ $numtok(%rcon.data,32),32)

        if (*"* iswm %rcon.data) {

          %rcon.data = $remove(%rcon.data,")

        }

        if (*<* iswm %rcon.data) {

          %rcon.data = $remove(%rcon.data,$gettok(%rcon.data,3,60))

          %rcon.data = $remove(%rcon.data,$gettok(%rcon.data,2,60))

          %rcon.data = $replace(%rcon.data,<<,)

        }

        if (World triggered Restart_Round_* iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,World triggered Restart_Round_,3Restart Round $+ $chr(32))

          %rcon.data = $replace(%rcon.data,second,$+ $chr(32) $+ second)

          %rcon.data = $remove(%rcon.data,_)

        }

        if (*<TERRORIST>* iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,<TERRORIST>,<T>)

        }

        if (*> with * iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,> with,> 3with)

        }

        if (*> killed* iswm %rcon.data) {

          %rcon.data = $remove(%rcon.data,$gettok(%rcon.data,-2,60))

          %rcon.data = $remove(%rcon.data,$gettok(%rcon.data,-2,60))

          %rcon.data = $remove(%rcon.data,<<)

          %rcon.data = $replace(%rcon.data,killed,3killed)

          if (*<CT* iswm $gettok(%rcon.data,-2,62)) {

            %rcon.death = $gettok(%rcon.data,-2,62)

            %rcon.death2 = 12 $gettok(%rcon.death,2-,32)

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,-2,62),$chr(32) $+ 3killed $+ $chr(32) $+ %rcon.death2)

          }

          if (*<T* iswm $gettok(%rcon.data,-2,62)) {

            %rcon.death = $gettok(%rcon.data,-2,62)

            %rcon.death2 = 4 $gettok(%rcon.death,2-,32)

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,-2,62),$chr(32) $+ 3killed $+ $chr(32) $+ %rcon.death2)

          }

          if (*<CT* iswm $gettok(%rcon.data,1,62)) {

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,60),12 $gettok(%rcon.data,1,60))
            #
          }

          if (*<T* iswm $gettok(%rcon.data,1,62)) {

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,60),4 $gettok(%rcon.data,1,60))

          }

        }

        if (*connected, address* iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,connected $+ $chr(44) address $gettok(%rcon.data,-1,32),connected)

          %rcon.data = $replace(%rcon.data,<>,)

        }

        if (*<> disconnected iswm %rcon.data) {

          %rcon.data = $remove(%rcon.data,<>,)

        }

        if (*<T> disconnected iswm %rcon.data) {

          %rcon.data = $remove(%rcon.data,<T>,)

        }

        if (*<CT> disconnected iswm %rcon.data) {

          %rcon.data = $remove(%rcon.data,<CT>,)

        }

        if (*STEAM USERID validated iswm %rcon.data) {

          %rcon.data = $null

        }

        if (*entered the game iswm %rcon.data) {

          %rcon.data = $null

        }

        if (*Spawned_With_The_Bomb* iswm %rcon.data) {

          %rcon.data = $remove(%rcon.data,triggered)

          %rcon.data = $replace(%rcon.data,Spawned_With_The_Bomb,3Spawned with the Bomb)

          %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),4 $gettok(%rcon.data,1,62))

        }

        if (*triggered Dropped_The_Bomb iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,triggered Dropped_The_Bomb,3Dropped the Bomb)

          %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),4 $gettok(%rcon.data,1,62))

        }

        if (*triggered Got_The_Bomb iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,triggered Got_The_Bomb,3Got the Bomb)

          %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),4 $gettok(%rcon.data,1,62))

        }

        if (*triggered Planted_The_Bomb iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,triggered Planted_The_Bomb,3Planted the Bomb!)

          %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),4 $gettok(%rcon.data,1,62))

        }

        if (Team TERRORIST triggered Target_Bombed* iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,Team TERRORIST triggered Target_Bombed,*** 4Terrorists WIN! 3(Target Bombed))

        }

        if (*triggered Begin_Bomb_Defuse_Without_Kit iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,triggered Begin_Bomb_Defuse_Without_Kit,3starts defusing without a kit)

          %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),12 $gettok(%rcon.data,1,62))

        }

        if (*triggered Begin_Bomb_Defuse_With_Kit iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,triggered Begin_Bomb_Defuse_With_Kit,3starts defusing with a kit)

          %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),12 $gettok(%rcon.data,1,62))

        }

        if (*triggered Defused_The_Bomb iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,triggered Defused_The_Bomb,3defused the bomb)

          %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),12 $gettok(%rcon.data,1,62))

        }

        if (Team CT triggered Bomb_Defused* iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,Team CT triggered Bomb_Defused,12CTs WIN! 3(Bomb Defused))

        }

        if (*committed suicide with world iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,committed suicide with world,3committed suicide)

          if (*<CT iswm $gettok(%rcon.data,1,62)) {

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),12 $gettok(%rcon.data,1,62))

          }

          if (*<T iswm $gettok(%rcon.data,1,62)) {

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),4 $gettok(%rcon.data,1,62))

          }

        }

        if (*committed suicide with grenade iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,committed suicide with grenade,3committed suicide with grenade)

          if (*<CT iswm $gettok(%rcon.data,1,62)) {

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),12 $gettok(%rcon.data,1,62))

          }

          if (*<T iswm $gettok(%rcon.data,1,62)) {

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),4 $gettok(%rcon.data,1,62))

          }

        }

        if (*joined team CT iswm %rcon.data) {

          %rcon.data = $remove(%rcon.data,<>)

          %rcon.data = $replace(%rcon.data,joined team CT,joined team 12CT)

          if (*<CT iswm $gettok(%rcon.data,1,62)) {

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),12 $gettok(%rcon.data,1,62))

          }

          if (*<T iswm $gettok(%rcon.data,1,62)) {

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),4 $gettok(%rcon.data,1,62))

          }

        }
        #
        if (*joined team TERRORIST iswm %rcon.data) {

          %rcon.data = $remove(%rcon.data,<>)

          %rcon.data = $replace(%rcon.data,joined team TERRORIST,joined team 4T)

          if (*<CT iswm $gettok(%rcon.data,1,62)) {

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),12 $gettok(%rcon.data,1,62))

          }

          if (*<T iswm $gettok(%rcon.data,1,62)) {

            %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),4 $gettok(%rcon.data,1,62))

          }

        }

        if (Team TERRORIST triggered Terrorists_Win* iswm %rcon.data) {

          %rcon.data = *** 4Ts WIN! 3(Eliminated Opponents) $gettok(%rcon.data,5-,32)

        }

        if (Team CT triggered CTs_Win* iswm %rcon.data) {

          %rcon.data = *** 12CTs WIN! 3(Eliminated Opponents) $gettok(%rcon.data,5-,32)

        }

        if (World triggered Round_Draw* iswm %rcon.data) {

          %rcon.data = *** 3Round Draw! $gettok(%rcon.data,4-,32)

        }

        if (Team CT scored* iswm %rcon.data) {

          %rcon.data = 12CT: $gettok(%rcon.data,4,32)

        }

        if (Team TERRORIST scored* iswm %rcon.data) {

          %rcon.data = 4T: $gettok(%rcon.data,4,32)

        }

        if (%rcon.data == World triggered Game_Commencing) {

          %rcon.data = $null

        }

        if (%rcon.data == World triggered Round_Start) {

          %rcon.data = $null

        }

        if (%rcon.data == World triggered Round_End) {

          %rcon.data = $null

        }

        if (Rcon: rcon* iswm %rcon.data) {

          %rcon.data = $null

        }

        if (Bad Rcon: rcon* iswm %rcon.data) {

          %rcon.data = $null

        }

        if (Server cvar* iswm %rcon.data) {

          %rcon.data = $null

        }

        if (Log file* iswm %rcon.data) {

          %rcon.data = $null

        }

        if (*say* iswm %rcon.data) {

          if (%rcon.says == 1) {

            if (*say_team* !iswm %rcon.data) {

              %rcon.data = $replace(%rcon.data,say,says:)

              if (*<CT iswm $gettok(%rcon.data,1,62)) {

                %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),12 $gettok(%rcon.data,1,62))

              }

              if (*<T iswm $gettok(%rcon.data,1,62)) {

                %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),4 $gettok(%rcon.data,1,62))

              }

            }

            else {

              %rcon.data = $replace(%rcon.data,say_team,says (TEAM):)

              if (*<CT iswm $gettok(%rcon.data,1,62)) {

                %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),12 $gettok(%rcon.data,1,62))

              }

              if (*<T iswm $gettok(%rcon.data,1,62)) {

                %rcon.data = $replace(%rcon.data,$gettok(%rcon.data,1,62),4 $gettok(%rcon.data,1,62))

              }

            }

          }

          else {

            %rcon.data = $null

          }

        }

        if (*<T>* iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,<T>,4<T>)

        }

        if (*<CT>* iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,<CT>,12<CT>)

        }

        if (* $chr(40) $+ CT* iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,$chr(40) $+ CT,12 $+ $chr(40) $+ CT)

        }

        if (* $chr(40) $+ T* iswm %rcon.data) {

          %rcon.data = $replace(%rcon.data,$chr(40) $+ T,4 $+ $chr(40) $+ T)

        }

        if (Team CT triggered Target_Saved* iswm %rcon.data) {

          %rcon.data = *** 12CTs WIN! 3(Target Saved) $gettok(%rcon.data,5-,32)

        }       

      }

      if (%rcon.data == $null) {

        goto nextread

      }

    }

  }

  if (%rcon.scorebot == 1) {

    if (%rcon.data != $null) {

      msg %rcon.scorebotchan %rcon.data

    }

  }

  if (%rcon.data != $null) {

    aline -p @rcon %rcon.data

  }

  goto nextread

}



on *:sockwrite:rcon:{

  if ($sockerr) {

    aline @rcon $sock().wserr

  }

}



on *:close:@rcon:{

  if (%rcon.scorebot == 1) {

    set %rcon.scorebot 0

  }

  set %rcon.myip $ip

  sockclose rcon.cmd

  sockudp -n rcon.cmd %rcon.ip %rcon.port rcon %rcon.challengenumber " $+ %rcon.password $+ " log off

  sockudp -n rcon 7130 %rcon.ip %rcon.port rcon %rcon.challengenumber " $+ %rcon.password $+ " logaddress_del %rcon.myip 7130

  sockclose rcon

  sockclose rcon.cmd

}



;; Original author: Parasite-FT-, #script (irc.gamesnet.net)

;; Modified by Byte to use a website which gave explicit permission to use it

;; Modified again by `fo-Psycho, #faceoff (irc.gamesnet.net) for SteamID comptibility.

;; Modified again by Parasite-FT-, just when you thought it was modified enough

;; Modified a tiny bit by bunkahumpa to suit steamid lookup needs for mIRCon



;; Open steamID connection / returns information about a socket

; usage: /steamID <nick> <target> <steamID>

; usage: $steamID(<socket name>,[item]).target|.id|.ticks

alias steamID {

  if ($isid) {

    if ($2) return $hget($sockname,$2)

    var %proptoks = target id ticks

    return $gettok($sock($1).mark,$findtok(%proptoks,$prop,1,32),32)

  }

  sockclose $+(steamid.,$1)

  sockopen $+(steamid.,$1) steamid.elite-pimps.com 80

  ; store sockmark as <target> <steamID> <ticks>

  sockmark $+(steamid.,$1) $2 $3 $ticks

}



;; Sends data to the user or channel

; usage: /steamID.send <socket name> <text>

alias steamID.send {

  if ($window(@rcon)) {

    aline -p @rcon $2-

  }

  else {

    echo -a The RCON Window is not open!

  }

}



;; Filters out html tags

; usage: $nohtml(<html text>)

alias nohtml {

  var %tmp, %ignore = $regsub($1-,/(<[^>]+>)/g,$chr(32),%tmp)

  return %tmp

}



;; [sTEAMID] ------- Sockopen event

on *:sockopen:steamid.*:{

  sockwrite -n $sockname GET /?action=search&type=single&key=steamid&query= $+ $steamid($sockname).id $+ &game=&league=&div=&output=xml HTTP/1.1

  sockwrite -n $sockname Host: steamid.elite-pimps.com

  sockwrite -n $sockname Connection: close

  sockwrite -n $sockname User-Agent: ircscripting.net steamID



}



;; [sTEAMID] ------- Sockread event

on *:sockread:steamid.*:{

  if ($sockerr > 0) return

  sockread %temp

  if (%temp == <disabled> ) steamID.send $sockname Error, Source DB has been disabled, please contact %owner

  elseif (%temp == </results> ) {

    if ($steamid($sockname,total) > 2) steamID.send $sockname (only 3 results shown, http://steamid.elite-pimps.com/?actio...ey=steamid&query= $+ $steamid($sockname).id $+ &game=&league=&div=)

    else steamID.send $sockname $iif(!$steamID($sockname,total),0,$steamID($sockname,total)) $iif($steamID($sockname,total) != 0,results,result) found. [#elite-pimps]

    if ($hget($sockname)) hfree $sockname

    sockclose $sockname

  }

  elseif (<*>*<*> iswm %temp) {

    var %regex = $regex($sockname,%temp,m~ < ( [^>]+ ) > ~x)

    hadd -m $sockname $regml($sockname,1) $nohtml(%temp)

  }

  elseif (%temp == </result>) {

    if ($steamid($sockname,total) > 2) return

    hinc $sockname total

    var %return STEAMID: $steamid($sockname).id  Alias: $steamid($sockname,player_alias) Team: $steamid($sockname,team_name) Channel: $steamid($sockname,team_irc) Game: $steamid($sockname,team_game) League: $steamid($sockname,team_league) $+ - $+ $steamid($sockname,team_division) Ban Status: $steamid($sockname,ban_status)

    steamID.send $sockname %return

  }

}



alias rcon.steamid {

  if ($window(@rcon)) {

    if (!$1) {

      aline @rcon A steamid is required.

    }

    else {

      steamID $me $me $1

    }

  }

  else {

    echo -a The RCON Window is not open!

  }

}



on *:TEXT:!servers*:#:{

  rcon status

  rcon sv_password

}
;==============
;==============
;==============

Credits:

Hawkee

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...