Throttled

By Bobbtyisdead on Sep 25, 2005

This script is a throttling manager, on my network we use a 2 min throttle instead of the default 1 minute throttle and if you don't stop getting throttled the delay before you can reconnect goes up, each time you fail to connect it resets the counter, so with mirc default settings, there's no way to connect to the server without manually disconnecting.

This script works in 2 ways, firstly it checks to see if it retrieves a server notice (the syntax might need editing) and if it does it sets this as the time before it reconnects, if it doesnt receive this message it just waits 2 minutes before connecting.

It also uses a primitive warning system, a sort of timed echo to tell you how long is left until it connects.

By Killer_hobbits/Khobbits/Bobbty
Originally made for: imperialconflict.com:7000
Last updated: 12:22 22/9/05

on 1:DISCONNECT: {
  if (%disconnected) {
    echo -a Connection throttled
    if (%disconnectdelay) {
      disconnect
      .timer 1 %disconnectdelay server
      if (%disconnectdelay > 600) { .timer 1 $calc(%disconnectdelay - 300) echo -a 10 min's till reconnect try }
      if (%disconnectdelay > 300) { .timer 1 $calc(%disconnectdelay - 300) echo -a 5 min's till reconnect try }
      if (%disconnectdelay > 185) { .timer 1 $calc(%disconnectdelay - 180) echo -a 3 min's till reconnect try }
      if (%disconnectdelay > 125) { .timer 1 $calc(%disconnectdelay - 120) echo -a 2 min's till reconnect try }
      .timer 1 $calc(%disconnectdelay - 90) echo -a 90 seconds till reconnect try
      .timer 1 $calc(%disconnectdelay - 60) echo -a 60 seconds till reconnect try
      .timer 1 $calc(%disconnectdelay - 30) echo -a 30 seconds till reconnect try
      .timer 1 $calc(%disconnectdelay - 10) echo -a 10 seconds till reconnect try
    }
    else {
      disconnect
      .timer 6 5 disconnect
      .timer 1 125 server
      .timer 1 35 echo -a 90 seconds till reconnect try
      .timer 1 65 echo -a 60 seconds till reconnect try
      .timer 1 95 echo -a 30 seconds till reconnect try
      .timer 1 115 echo -a 10 seconds till reconnect try
    }
  }
}

on 1:error:*throttled*: { 
  set -u2 %disconnected 1
}

on 1:snotice:*You have been throttled for*: {
  echo -a you have been throttled for $6 mins or $calc($6 * 60) seconds
  set -u2 %disconnectdelay $calc(($6 * 60) +5)
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.