Jump to content

Ignore System


Guest LAS

Recommended Posts

mdx { dll mdx.dll $1- }
alias aignore { if ($dialog(ig)) dialog -x ig ig | dialog -m ig ig }
dialog ig {
 title "Ignore"
 size -1 -1 172 78
 option dbu
 list 1, 2 2 84 74, size vsbar
 list 2, 86 2 84 74, size vsbar
 menu "Options", 3
 menu "Ignore Time", 4, 3
 item "Set", 8, 4
 item "Unset", 9, 4
 menu "Mass Ignore", 5, 3
 item "Ignore", 6, 5
 item "Unignore", 7, 5
 menu "Ignore List", 10, 3
 item "Open", 13, 10
 item "Load", 11, 10
 item "Unload", 12, 10
}
on *:dialog:ig:init:*:{
 mdx SetMircVersion $version
 mdx MarkDialog $dname
 mdx SetColor $dname 1,2 text $rgb(255,255,255)
 mdx SetColor $dname 1,2 textbg $rgb(0,0,0)
 mdx SetColor $dname 1,2 background $rgb(0,0,0)
 mdx SetFont $dname 1,2 12 500 Tahoma
 mdx SetBorderStyle $dname 1,2 staticedge
 .ignores
 .igno
}
on *:dialog:ig:sclick:1:{ set %remove $did(1).seltext }
on *:dialog:ig:sclick:2:{ set %add $did(1).seltext }
on *:dialog:ig:dclick:1:{ .ignore -r %remove | .ignores }
on *:dialog:ig:dclick:2:{ 
 if (%igt) { .ignore -u $+ %igt %add | .ingo }
 else { .ignore %add | .ingo }
}
on *:dialog:ig:menu:*:{
 if ($did == 6) { mignore | .ignores }
 elseif ($did == 7) { umignore | .ignores }
 elseif ($did == 8) { set %igt $$?"ENTER TIME:(Example: 10):" | set %igt $calc(%igt *60) }
 elseif ($did == 9) { unset %igt }
 elseif ($did == 11) { 
   if ($exists(ignore.log) == $true) { .lignore | ignores }
   else { .echo $color(info text) -a Ignore Log Doesn't Exist. }
 }
 elseif ($did == 12) { 
   if ($exists(ignore.log) == $true) { .uignore | ignores }
   else { .echo $color(info text) -a Ignore Log Doesn't Exist. }
 }
 elseif ($did == 13) { .eignore }
}
alias mignore {
 var %i = 1
 while (%i <= $nick($active,0)) {
   if (%igt) { .ignore -u $+ %igt $nick($active,%i) }
   else { .ignore $nick($active,%i) }
   inc %i
 }
}
alias lignore {
 var %i = 1
 while (%i <= $lines(ignore.log)) {
   .ignore $read(ignore.log, %i)
   inc %i
 }
}
alias uignore {
 var %i = 1
 while (%i <= $lines(ignore.log)) {
   .ignore -r $read(ignore.log, %i)
   inc %i
 }
}
alias umignore {
 var %i = 1
 while (%i <= $ignore(0)) {
   .ignore -r $ignore(%i)
   inc %i
 }
}
alias ignores {
 did -r ig 1
 var %i = 1
 while (%i <= $ignore(0)) {
   did -a ig 1 $ignore(%i)
   inc %i
 }
}
alias igno {
 did -r ig 2
 var %i = 1
 while (%i <= $nick($active,0)) {
   did -a ig 2 $nick($active,%i)
   inc %i
 }
}
alias eignore { if ($dialog(ige)) dialog -x ige ige | dialog -mo ige ige }
dialog ige {
 title "Ignore Log $lines(ignore.log)"
 size -1 -1 98 70
 option dbu
 list 1, 0 0 98 50, size vsbar
 edit "", 2, 0 50 98 10, center
 button "&Add", 3, 48 60 25 10
 button "&Ok", 4, 74 60 25 10, ok
 text Do not add: !*@*, 5, 2 60 45 8
}

on *:dialog:ige:init:*:{
 mdx SetMircVersion $version
 mdx MarkDialog $dname
 mdx SetColor $dname 1,2 text $rgb(255,255,255)
 mdx SetColor $dname 1,2 textbg $rgb(0,0,0)
 mdx SetColor $dname 1,2 background $rgb(0,0,0)
 mdx SetFont $dname 1,2,3,4,5 12 500 Tahoma
 mdx SetBorderStyle $dname 1,2 staticedge
 mdx SetBorderStyle $dname 3,4 clientedge
 eignorel
}
on *:dialog:ige:sclick:1:{ set -u5 %remove $did(1).sel }
on *:dialog:ige:dclick:1:{ write -dl $+ %remove ignore.log | eignorel }
on *:dialog:ige:edit:2:{ set -u60 %add $did(2).text }
on *:dialog:ige:sclick:3:{ write ignore.log %add | did -r $dname 2 | eignorel }
alias eignorel {
 dialog -t ige Ignore Log $lines(ignore.log)
 did -r ige 1
 var %i = 1
 while (%i <= $lines(ignore.log)) {
   did -a ige 1 $read(ignore.log, %i)
   inc %i
 }
}

 

Yet another simple code for the people out there. happy.gif Remeber you need mdx.dll for this. This also allows you to add ignore your list and remove them as well. Hope this comes in handy to anyone. tongue.gif Also this code should work on any server sense it works off /ignore.

Link to comment
Share on other sites

err.. I found out something.. I made a two small mistake near the first.. oops.gif So here is the fix..

alias mdx { dll mdx.dll $1- }
alias aignore { if ($dialog(ig)) dialog -x ig ig | dialog -m ig ig }
dialog ig {
title "Ignore"
size -1 -1 172 78
option dbu
list 1, 2 2 84 74, size vsbar
list 2, 86 2 84 74, size vsbar
menu "Options", 3
menu "Ignore Time", 4, 3
item "Set", 8, 4
item "Unset", 9, 4
menu "Mass Ignore", 5, 3
item "Ignore", 6, 5
item "Unignore", 7, 5
menu "Ignore List", 10, 3
item "Open", 13, 10
item "Load", 11, 10
item "Unload", 12, 10
}
on *:dialog:ig:init:*:{
mdx SetMircVersion $version
mdx MarkDialog $dname
mdx SetColor $dname 1,2 text $rgb(255,255,255)
mdx SetColor $dname 1,2 textbg $rgb(0,0,0)
mdx SetColor $dname 1,2 background $rgb(0,0,0)
mdx SetFont $dname 1,2 12 500 Tahoma
mdx SetBorderStyle $dname 1,2 staticedge
.ignores
.igno
}
on *:dialog:ig:sclick:1:{ set %remove $did(1).seltext }
on *:dialog:ig:sclick:2:{ set %add $did(2).seltext }
on *:dialog:ig:dclick:1:{ .ignore -r %remove | .ignores }
on *:dialog:ig:dclick:2:{ 
if (%igt) { .ignore -u $+ %igt %add | .ingo }
else { .ignore %add | .ingo }
}
on *:dialog:ig:menu:*:{
if ($did == 6) { mignore | .ignores }
elseif ($did == 7) { umignore | .ignores }
elseif ($did == 8) { set %igt $$?"ENTER TIME:(Example: 10):" | set %igt $calc(%igt *60) }
elseif ($did == 9) { unset %igt }
elseif ($did == 11) { 
  if ($exists(ignore.log) == $true) { .lignore | ignores }
  else { .echo $color(info text) -a Ignore Log Doesn't Exist. }
}
elseif ($did == 12) { 
  if ($exists(ignore.log) == $true) { .uignore | ignores }
  else { .echo $color(info text) -a Ignore Log Doesn't Exist. }
}
elseif ($did == 13) { .eignore }
}
alias mignore {
var %i = 1
while (%i <= $nick($active,0)) {
  if (%igt) { .ignore -u $+ %igt $nick($active,%i) }
  else { .ignore $nick($active,%i) }
  inc %i
}
}
alias lignore {
var %i = 1
while (%i <= $lines(ignore.log)) {
  .ignore $read(ignore.log, %i)
  inc %i
}
}
alias uignore {
var %i = 1
while (%i <= $lines(ignore.log)) {
  .ignore -r $read(ignore.log, %i)
  inc %i
}
}
alias umignore {
var %i = 1
while (%i <= $ignore(0)) {
  .ignore -r $ignore(%i)
  inc %i
}
}
alias ignores {
did -r ig 1
var %i = 1
while (%i <= $ignore(0)) {
  did -a ig 1 $ignore(%i)
  inc %i
}
}
alias igno {
did -r ig 2
var %i = 1
while (%i <= $nick($active,0)) {
  did -a ig 2 $nick($active,%i)
  inc %i
}
}
alias eignore { if ($dialog(ige)) dialog -x ige ige | dialog -mo ige ige }
dialog ige {
title "Ignore Log $lines(ignore.log)"
size -1 -1 98 70
option dbu
list 1, 0 0 98 50, size vsbar
edit "", 2, 0 50 98 10, center
button "&Add", 3, 48 60 25 10
button "&Ok", 4, 74 60 25 10, ok
text Do not add: !*@*, 5, 2 60 45 8
}

on *:dialog:ige:init:*:{
mdx SetMircVersion $version
mdx MarkDialog $dname
mdx SetColor $dname 1,2 text $rgb(255,255,255)
mdx SetColor $dname 1,2 textbg $rgb(0,0,0)
mdx SetColor $dname 1,2 background $rgb(0,0,0)
mdx SetFont $dname 1,2,3,4,5 12 500 Tahoma
mdx SetBorderStyle $dname 1,2 staticedge
mdx SetBorderStyle $dname 3,4 clientedge
eignorel
}
on *:dialog:ige:sclick:1:{ set -u5 %remove $did(1).sel }
on *:dialog:ige:dclick:1:{ write -dl $+ %remove ignore.log | eignorel }
on *:dialog:ige:edit:2:{ set -u60 %add $did(2).text }
on *:dialog:ige:sclick:3:{ write ignore.log %add | did -r $dname 2 | eignorel }
alias eignorel {
dialog -t ige Ignore Log $lines(ignore.log)
did -r ige 1
var %i = 1
while (%i <= $lines(ignore.log)) {
  did -a ige 1 $read(ignore.log, %i)
  inc %i
}
}

 

I would have fixed it sooner but I was busy.. Sorry. Anywas thats the fix for it.. 2 errors been fixed. If you find anymore tell me please. thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...