Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Auto-Rejoin on Ban or Block

Recommended Posts

  • Administrators

Automatically rejoin channels you have been banned or blocked from joining.

 

Great for making sure your unattended client stays in all its channels, weathering through netsplits and takeovers or the occasional kick-ban.

 

Comments and Likes appreciated, especially if you find this useful.

 

>; r_autorejoin.mrc * Version 2.2 * 21-Nov-2012 * Raccoon/EFnet; This script has no dependencies. It belongs in the Remotes section.[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial];*******************************************************************************;* Automatically rejoin channels you have been banned or blocked from joining. *;* The script will keep retrying until you close the channel or get back in.   *;* First 12 tries at +10,+20... seconds, and then between 10-30 minutes random.*;* Requires 'Rejoin channel when kicked' and 'Keep channels open' are enabled. *;* Also some extras: Rejoin on Invite, and Rejoin on Freenode's /quote remove  *;* Written by Raccoon on 21-Nov-2012. #mIRC/EFNet #mSL/SwiftIRC www.hawkee.com *;*******************************************************************************[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial];----- Begin "Auto-Rejoin When Blocked" by Raccoon -----RAW 474:*: fail_join $2 until ban is lifted...RAW 471:*: fail_join $2 until limit is increased...RAW 473:*: fail_join $2 until invite-only is removed...RAW 475:*: fail_join $2 until key is removed...RAW 477:*: fail_join $2 until auth-only is removed...RAW 480:*Cannot join channel*: fail_join $2 until SSL-only is removed...RAW 489:*Cannot join channel*: fail_join $2 until SSL-only is removed...RAW 437:*temporarily unavailable*: fail_join $2 until channel becomes available...[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial]ALIAS -l fail_join { ; By Raccoon 21-Nov-2012  if ($1 ischan) {    inc -eu1830 %FAILJOIN. $+ $cid $+ $1    var %n = $($+(%,FAILJOIN.,$cid,$1),2)    var %t = $iif(%n isnum 1-12,$calc(%n * 10),$r(600,1800))    .timerFAILJOIN. $+ $cid $+ $1 1 %t _timer_rejoin $chsafe($1)    var %str = Attempting to rejoin $2-    if (%n == 1) { .timer 1 0 echo -tic notice $chsafe($1) * %str }    else { haltdef }} }[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial]ALIAS -l _timer_rejoin { ; By Raccoon 21-Nov-2012  if ($1 ischan) && ($me !ison $1) { !join $1 $chan($1).key }  else { unset %FAILJOIN. $+ $cid $+ $1 }}[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial];366 $me $chan :End of /NAMES list.RAW 366:*: { unset %FAILJOIN. $+ $cid $+ $2 }[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial];Use in /timers to sanitize channel names like #$($p(hacked!)). By Raccoon.ALIAS -l chsafe { return $iif($ isin $1,$!replace( $replace($1,$,`$) ,`$,$),$1) }[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial];*** EXTRAS ***[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial];Auto-rejoin open channel when Invited. Useful for mistake kick-bans.On *:INVITE:#: if ($chan ischan) { !join $chan $chan($chan).key }[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial];Auto-rejoin on forced part via '/quote remove $chan $nick' command on Freenode.On me:*:PART:#: { ; By Raccoon 18-Nov-2012  if $regex($1-,/requested by (\S+) \(\S+\)/) {    var %r = $r(10,30)    echo -stic notice * Forcibly Parted from $chan by $regml(1) $+ . Rejoining in %r seconds...    .timer 1 %r !join -n $chsafe($chan)} };----- End "Auto-Rejoin When Blocked" by Raccoon -----[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial];v1.0 27-Aug-2012 - Auto Rejoin when Banned, initial script.;v1.1 12-Sept-2012 - Added $chsafe() to sanitize potential exploits.;v2.0 18-Nov-2012 - Rewritten to support all blocks; +b/+l/+i/+k/netsplit.;v2.1 18-Nov-2012 - Added support for other channel join blocks (auth/ssl/etc).;				   Also threw in some extras: Rejoin on Invite, and on /remove.;v2.2 21-Nov-2012 - Fixed: Instance of %chan should be $1 in timer's name.;TODO: Attempt retrying channels that haven't been joined yet (no channel window).;	  This will require some custom @window listing channels in queue to rejoin.[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial];http://www.hawkee.com/snippet/9729/;http://kthx.net/paste/abpw70srhzc40808kocgs[/font][/color][color=#333333][font='Open Sans', Helvetica, Arial]

 

By raccoon

Link to comment
Share on other sites



×
×
  • Create New...