Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Welcome to ServerStatusChecker's guide on how i check the status!
- If you have any idea how/what mirc scripting is, you may understand this!
- I remove the password so people don't change it and break me q.q
- */
- on *:text:status:*:{
- msg $nick Server runnng - %ttivar
- }
- alias toon {
- if (!$sslready) return $input(SSL is required,o)
- sockclose toon
- sockopen -e toon toontowninfinite.com 443
- if (%ttivar !== %oldttivar) {
- if (%ttivar == false) {
- msg #tticommunity [server status checker] Oh no! looks like the server went down! (say status anytime to get status)
- msg KevinH Game is now offline, topic change?
- msg Relltrem Game is now offline, topic change?
- }
- if (%ttivar == true) {
- msg #tticommunity [server status checker] HOORAY! the server is back up! go bust some cogs and spin some gears! (say status anytime to get status)
- msg KevinH Game is back online, topic change?
- msg Relltrem Game is now offline, topic change?
- }
- }
- }
- alias start { --
- msg #tticommunity Automatic server status checker Activated. If the server changes status the irc will be first to know, without any troll messages! (say status anytime to get status)
- echo -a server status checker started
- .timerggnoregui 0 11 toon
- }
- alias stop {
- msg #tticommunity Automatic server status checker Deactivated. (say status anytime to get status)
- echo -a server status checker stopped
- .timerggnoregui off
- }
- on *:sockopen:toon:{
- if ($sockerr) return $input(Error while trying to connect to the server,o)
- var %sw sockwrite -n toon
- %sw POST /api/login/ HTTP/1.1
- %sw Host: toontowninfinite.com
- %sw Accept: */*
- %sw Content-Type: application/x-www-form-urlencoded
- %sw Content-Length: 33
- %sw
- sockwrite toon n=ircCheckr&p=(no password for you)&dist=test
- }
- on *:sockread:toon:{
- if ($sockerr) return $input(An error occured while reading data,o)
- var %a
- sockread -f %a
- if (*{"success":* iswm %a) {
- set -e %ttivar $gettok($gettok(%a,2,58),1,44)
- .timerlolggnore 1 9 set -e %oldttivar $gettok($gettok(%a,2,58),1,44)
- echo -a %a
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment