All pastes #187532 Raw Edit

Untitled

public text v1 · immutable
·published 2006-10-01 05:48 UTC
rendered paste body
on *:LOAD:{
  if ($version < 6.03) { echo -a 10(4!10) You need atleast mIRC v6.03 or higher for this addon. www.mirc.com | .unload -rs $script }
  else {
    echo -a 10(9!10) Creating hash table...
    echo -a 10(9!10) Created by [-Titch-], irc.zerofuzion.net, #WareZX, #WXChat
    echo -a 10(9!10) Mirc netsplit loaded ... Enjoy.
    echo -a 10(9!10) To view the dialog type /nsap
  }
}
dialog nsap {
  title "Netsplit Detector 1.1"
  size -1 -1 127 159
  option dbu
  tab "Netsplit Detector", 1, 1 0 124 157
  combo 3, 7 84 112 53, tab 1 size drop
  box "On/Off", 6, 3 17 120 25, tab 1
  box "Notify", 7, 3 44 120 27, tab 1
  radio "All Channels", 8, 8 56 50 10, group tab 1
  radio "Active Channel", 9, 70 56 50 10, tab 1
  box "Styles", 10, 3 75 120 48, tab 1
  text "Colorless Preview:", 11, 8 97 43 8, tab 1
  edit "", 12, 7 107 112 12, tab 1 autohs
  button "Cancel / Dont Save", 16, 63 127 60 12, tab 1 cancel
  check "Enable / Disable", 17, 6 25 114 15, group tab 1 push
  button "Finished / Apply", 15, 3 127 60 12, ok
}

on 1:DIALOG:nsap:sclick:15: { if ($did(nsap,3).sel == 1) { write -c $mircdirsystem/nsstyle.txt Style 1 }
  if ($did(nsap,3).sel == 2) { write -c $mircdirsystem/nsstyle.txt Style 2 }
  if ($did(nsap,3).sel == 3) { write -c $mircdirsystem/nsstyle.txt Style 3 }
  if ($did(nsap,3).sel == 4) { write -c $mircdirsystem/nsstyle.txt Style 4 }
  if ($did(nsap,3).sel == 5) { write -c $mircdirsystem/nsstyle.txt Style 5 } 
  if ($did(nsap,17).state == 1) { .enable #netsplit | write -c $mircdirsystem/nsstatus.txt on }
  if ($did(nsap,17).state == 0) { .disable #netsplit | write -c $mircdirsystem/nsstatus.txt off }
}


on 1:DIALOG:nsap:sclick:3: { if ($did(nsap,3).sel == 1) { did -ra nsap 12 Netsplit Dectected Between Servers server1 <-> server2 | echo -a 9N14etspli9t D14etecte9d B14etwee9n S14erver9s14 server1 9<14-9>14 server2 }
  if ($did(nsap,3).sel == 2) { did -ra nsap 12 NeTsPlIt DeCtEd BeTwEeN SeRvErs server1 <-=-> server2 | echo -a 9NeTsPlIt 14DeTeCtEd 9BeTwEeN 14SeRvErs9 server1 14<-9=14->9 server2 }
  if ($did(nsap,3).sel == 3) { did -ra nsap 12 <Netsplit> <Detected> <Between> <Servers> <server1> && <server2> | echo -a 9<14Netsplit9> <14Detected9> <14Between9> <14Servers9> <14server19> 14&& 9<14server29> }
  if ($did(nsap,3).sel == 4) { did -ra nsap 12 server1 & server2 Have Split Apart | echo -a 9server1 14& 9server2 14Have Split Apart }
if ($did(nsap,3).sel == 5) { did -ra nsap 12 Hold On Tight! server1 & server2 Just Split Apart! | echo -a 9Hold On Tight!14 server1 9& server2 9Just Split Apart! } }

on 1:DIALOG:nsap:init:*: { 
  did -i nsap 3 1 Style 1 
  did -i nsap 3 2 Style 2 
  did -i nsap 3 3 Style 3
  did -i nsap 3 4 Style 4 
  did -i nsap 3 5 Style 5  
  if ($read($mircdirsystem\nsstyle.txt) == Style 1) { did -c nsap 3 1 | did -ra nsap 12 Netsplit Detected Between Servers server1 <-> server2 } 
  if ($read($mircdirsystem\nsstyle.txt) == Style 2) { did -c nsap 3 2 | did -ra nsap 12 NeTsPlIt DeTeCtEd BeTwEeN SeRvErs server1 <-=-> server2 } 
  if ($read($mircdirsystem\nsstyle.txt) == Style 3) { did -c nsap 3 3 | did -ra nsap 12 <Netsplit> <Detected> <Between> <Servers> <server1> && <server2> } 
  if ($read($mircdirsystem\nsstyle.txt) == Style 4) { did -c nsap 3 4 | did -ra nsap 12 server1 & server2 Have Split Apart } 
  if ($read($mircdirsystem\nsstyle.txt) == Style 5) { did -c nsap 3 5 | did -ra nsap 12 Hold On Tight! server1 & server2 Just Split Apart! } 
  if (amsg iswm $read($mircdirsystem/nsmsg.txt)) { did -c nsap 8 } 
  if (amsg !iswm $read($mircdirsystem/nsmsg.txt)) { did -c nsap 9 } 
  if (on iswm $read($mircdirsystem/nsstatus.txt)) { did -c nsap 17 }
  if (off iswm $read($mircdirsystem/nsstatus.txt)) { did -u nsap 17 }
} 

on 1:DIALOG:nsap:sclick:8: { write $mircdirsystem/nsmsg.txt amsg }
on 1:DIALOG:nsap:sclick:9: { write $mircdirsystem/nsmsg.txt msg }


#netsplit on
on *:QUIT: { if (. isin $1) && (. isin $2) && ($3 == $null) { if ($1 == %split.1) && ($2  == %split.2) goto end
    if ((Style 1 iswm $read($mircdirsystem/nsstyle.txt)) && (amsg iswm $read($mircdirsystem/nsstyle.txt))) goto amsgstyle1
    if ((Style 1 iswm $read($mircdirsystem/nsstyle.txt)) && (msg iswm $read($mircdirsystem/nsstyle.txt))) goto msgstyle1
    if ((Style 2 iswm $read($mircdirsystem/nsstyle.txt)) && (amsg iswm $read($mircdirsystem/nsstyle.txt))) goto amsgstyle2
    if ((Style 2 iswm $read($mircdirsystem/nsstyle.txt)) && (msg iswm $read($mircdirsystem/nsstyle.txt))) goto msgstyle2
    if ((Style 3 iswm $read($mircdirsystem/nsstyle.txt)) && (amsg iswm $read($mircdirsystem/nsstyle.txt))) goto amsgstyle3
    if ((Style 3 iswm $read($mircdirsystem/nsstyle.txt)) && (msg iswm $read($mircdirsystem/nsstyle.txt))) goto msgstyle3
    if ((Style 4 iswm $read($mircdirsystem/nsstyle.txt)) && (amsg iswm $read($mircdirsystem/nsstyle.txt))) goto amsgstyle4
    if ((Style 4 iswm $read($mircdirsystem/nsstyle.txt)) && (msg iswm $read($mircdirsystem/nsstyle.txt))) goto msgstyle4
    if ((Style 5 iswm $read($mircdirsystem/nsstyle.txt)) && (amsg iswm $read($mircdirsystem/nsstyle.txt))) goto amsgstyle5
    if ((Style 5 iswm $read($mircdirsystem/nsstyle.txt)) && (msg iswm $read($mircdirsystem/nsstyle.txt))) goto msgstyle5

    :amsgstyle1
    amsg 9N14etspli9t D14etecte9d B14etwee9n S14erver9s14 $1 9<14-9>14 $2  | splay sounds\netsplit.wav | goto next
    :msgstyle1
    msg $active 9N14etspli9t D14etecte9d B14etwee9n S14erver9s14 $1 9<14-9>14 $2  | splay sounds\netsplit.wav | goto next

    :amsgstyle2
    amsg 9NeTsPlIt 14DeTeCtEd 9BeTwEeN 14SeRvErs9 $1 14<-9=14->9 $2 $+  | splay sounds\netsplit.wav | goto next
    :msgstyle2
    msg $active 9NeTsPlIt 14DeTeCtEd 9BeTwEeN 14SeRvErs9 $1 14<-9=14->9 $2 $+  | splay sounds\netsplit.wav | goto next

    :amsgstyle3
    amsg 9<14Netsplit9> <14Detected9> <14Between9> <14Servers9> <14 $+ $1 $+ 9> 14&& 9<14 $+ $2 $+ 9> | splay sounds\netsplit.wav | goto next
    :msgstyle3
    msg $active 9<14Netsplit9> <14Detected9> <14Between9> <14Servers9> <14 $+ $1 $+ 9> 14&& 9<14 $+ $2 $+ 9> | splay sounds\netsplit.wav | goto next

    :amsgstyle4
    amsg 9 $+ $1 14& 9 $+ $2 14Have Split Apart | splay sounds\netsplit.wav | goto next
    :msgstyle4
    msg $active 9 $+ $1 14& 9 $+ $2 14Have Split Apart | splay sounds\netsplit.wav | goto next

    :amsgstyle5
    amsg 9Hold On Tight!14 $1 9& $2 9Just Split Apart! | splay sounds\netsplit.wav | goto next
    :msgstyle5
    msg $active 9Hold On Tight!14 $1 9& $2 9Just Split Apart! | splay sounds\netsplit.wav |goto next

    :next
    set %split.1 $1
    set %split.2 $2

    :end
  }
}
#netsplit end

;############# menubars - only part that may be moved/edited :) - yeh I know it's a bit retarted with the groups now.. wait till I make the menu system ############

#menu.menubar on

menu menubar {
  -
  Netsplit Detecter
  .NetSplit: { splay sounds\scanenable.wav | dialog -mdie nsap nsap } 
}
#menu.menubar end

#menu.channel on
menu channel {
  -
  Netsplit Detecter
  .NetSplit: { splay sounds\scanenable.wav | dialog -mdie nsap nsap }
}
#menu.channel end

#menu.query on
menu query {
  -
  mIRC Stats
  .dialogs
  ..main dialog $iif($hg(menu.commands),	/stats) :stats
  ..configuration $iif($hg(menu.commands),	/stats config) :stats config
  ..-
  ..been stats $iif($hg(menu.commands),	/stats been) :stats been
  ..have stats $iif($hg(menu.commands),	/stats have) :stats have
  ..seen stats $iif($hg(menu.commands),	/stats seen) :stats seen
  .launch webpage $iif($hg(menu.commands), 	/statsweb) :statsweb
  .-
  .help $iif($hg(menu.commands),	/stats help) :stats help
  .-
  .echo stats
  ..Servers $iif($hg(menu.commands),	/secho servers) :secho servers
  ..Power $iif($hg(menu.commands),	/secho power) :secho power
  ..-
  ..Time $iif($hg(menu.commands),	/secho time) :secho time
  ..Uptime $iif($hg(menu.commands),	/secho uptime) :secho uptime
  ..Events $iif($hg(menu.commands),	/secho events) :secho events
  ..Text stuff $iif($hg(menu.commands),	/secho texts) :secho texts
  ..-
  ..Been stats $iif($hg(menu.commands),	/secho been) :secho been
  ..Have stats $iif($hg(menu.commands),	/secho have) :secho have
  ..Seen stats $iif($hg(menu.commands),	/secho seen) :secho seen
  ..-
  ..CPU info $iif($hg(menu.commands),	/secho cpu) :secho cpu
  ..OS info $iif($hg(menu.commands), 	/secho os) :secho os
  ..Cache info $iif($hg(menu.commands),	/secho cache) : secho cache
  ..HDD info $iif($hg(menu.commands),	/secho hdd) :secho hdd
  ..GFX info $iif($hg(menu.commands),	/secho gfx) :secho gfx
  ..Connection info $iif($hg(menu.commands),	/secho con) :secho con
  ..Network info $iif($hg(menu.commands),	/secho eth) :secho eth
  ..-
  ..Custom $iif($hg(menu.commands),	/secho custom) :secho custom
  .$iif($1,CTCP)
  ..$iif($hg(menu.commands),$style(2) Command $+ $chr(58) 	/ctcp $1 STATS [info]):bla
  ..-
  ..Power $iif($hg(menu.commands),	POWER) :ctcp $$1 STATS POWER
  ..-
  ..Time $iif($hg(menu.commands),	TIME) :ctcp $$1 STATS TIME
  ..Uptime $iif($hg(menu.commands),	UPTIME) :ctcp $$1 STATS UPTIME
  ..Events $iif($hg(menu.commands),	EVENTS) :ctcp $$1 STATS EVENTS
  ..Text stuff $iif($hg(menu.commands),	TEXTS) :ctcp $$1 STATS TEXTS
  ..-
  ..Been stats $iif($hg(menu.commands),	BEEN) :ctcp $$1 STATS BEEN
  ..Have stats $iif($hg(menu.commands),	HAVE) :ctcp $$1 STATS HAVE
  ..Seen stats $iif($hg(menu.commands),	SEEN) :ctcp $$1 STATS SEEN
  ..-
  ..CPU info $iif($hg(menu.commands),	CPU) :ctcp $$1 STATS CPU
  ..OS info $iif($hg(menu.commands), 	OS) :ctcp $$1 STATS OS
  ..Cache info $iif($hg(menu.commands),	CACHE) :ctcp $$1 STATS CACHE
  ..GFX info $iif($hg(menu.commands),	GFX) :ctcp $$1 STATS GFX
  ..Connection info $iif($hg(menu.commands),	CON) :ctcp $$1 STATS CON
  ..Network info $iif($hg(menu.commands),	ETH) :ctcp $$1 STATS ETH
  ..-
  ..Custom $iif($hg(menu.commands),	CUSTOM) :ctcp $$1 STATS CUSTOM
}
#menu.query end

#menu.nicklist off
menu nicklist {
  -
  mIRC Stats
  .dialogs
  ..main dialog $iif($hg(menu.commands),	/stats) :stats
  ..configuration $iif($hg(menu.commands),	/stats config) :stats config
  ..-
  ..been stats $iif($hg(menu.commands),	/stats been) :stats been
  ..have stats $iif($hg(menu.commands),	/stats have) :stats have
  ..seen stats $iif($hg(menu.commands),	/stats seen) :stats seen
  .launch webpage $iif($hg(menu.commands), 	/statsweb) :statsweb
  .-
  .help $iif($hg(menu.commands),	/stats help) :stats help
  .-
  .$iif($1,CTCP)
  ..$iif($hg(menu.commands),$style(2) Command $+ $chr(58) 	/ctcp $1 STATS [info]):bla
  ..-
  ..Power $iif($hg(menu.commands),	POWER) :ctcp $$1 STATS POWER
  ..-
  ..Time $iif($hg(menu.commands),	TIME) :ctcp $$1 STATS TIME
  ..Uptime $iif($hg(menu.commands),	UPTIME) :ctcp $$1 STATS UPTIME
  ..Events $iif($hg(menu.commands),	EVENTS) :ctcp $$1 STATS EVENTS
  ..Text stuff $iif($hg(menu.commands),	TEXTS) :ctcp $$1 STATS TEXTS
  ..-
  ..Been stats $iif($hg(menu.commands),	BEEN) :ctcp $$1 STATS BEEN
  ..Have stats $iif($hg(menu.commands),	HAVE) :ctcp $$1 STATS HAVE
  ..Seen stats $iif($hg(menu.commands),	SEEN) :ctcp $$1 STATS SEEN
  ..-
  ..CPU info $iif($hg(menu.commands),	CPU) :ctcp $$1 STATS CPU
  ..OS info $iif($hg(menu.commands), 	OS) :ctcp $$1 STATS OS
  ..Cache info $iif($hg(menu.commands),	CACHE) :ctcp $$1 STATS CACHE
  ..GFX info $iif($hg(menu.commands),	GFX) :ctcp $$1 STATS GFX
  ..Connection info $iif($hg(menu.commands),	CON) :ctcp $$1 STATS CON
  ..Network info $iif($hg(menu.commands),	ETH) :ctcp $$1 STATS ETH
  ..-
  ..Custom $iif($hg(menu.commands),	CUSTOM) :ctcp $$1 STATS CUSTOM
}
#menu.nicklist end