here ya go. I just finished writing this for someone on the forums. Its for Unreal IRcd, but should work on any server with the same formats for the commands.
"/grater" brings up the dialog.
"/grater bla" will bring up the dialog as if you had typed bla in the searchbox and click who.
all the buttons should work.
You can highlight multiple items. if you click warn, and someone has already been warned. They will automatically be warned. (it notices people in groups of 10 your warning msg)
People will automatically be removed from the list after warn/kill/kline/gline.
on the history tab, you can select the actions you've performed and get a list of all addresses you've performed each on.
The history is saved, so if you gline someone for 30 days and they come back, they wont get a second warning (unless you delete the file warn.hsh in the scriptdir.)
You will need to change the options in "alias grater.set.options" (there are defualts in place)
This may not work on all networks.
alias grater {
dialog -m grater grater
grater.set.options
if ( $1 ) {
did -ra grater 10 $1
grater.dialog.who
}
}
alias grater.set.options {
set %grater.warn.notice You have a ident that is deemed unsuitable for this Network. Please change it with "/identd on Ident" Where Ident is an acceptable word.
set %grater.kill.reason Reason
set %grater.kline.time 1d
set %grater.kline.reason Kline_Reason
set %grater.Gline.time 1d
set %grater.gline.reason Gline_Reason
}
alias grater.dialog.who {
if ( $did(grater,10).edited ) {
.enable #whobadidentcheck
set %badident $did(grater,10).text
did -r grater 11
who $+(*,$did(grater,10).text,*)
did -j grater 10
}
}
dialog grater {
title ""G" Rater"
size -1 -1 188 162
option dbu
tab "Whois", 50, 0 -2 187 144
text "Who:", 20, 5 21 17 8, tab 50
edit "Enter Word as 'badword'", 10, 24 20 98 10, tab 50
box "Results:", 21, 2 33 184 94, tab 50
list 11, 4 40 180 85, tab 50 sort size extsel
button "Warn", 6, 6 128 30 12, tab 50
button "Kill", 7, 49 128 30 12, tab 50
button "Kline", 8, 84 128 30 12, tab 50
button "Gline", 9, 119 128 30 12, tab 50
button "Who", 5, 134 19 30 12, tab 50
tab "History", 51
combo 100, 44 18 136 42, tab 51 size drop
text "Action Taken:", 120, 5 19 36 8, tab 51
box "Addresses: (double click to remove)", 121, 3 31 182 107, tab 51
list 101, 5 38 177 97, tab 51 sort size
button "OK", 1, 75 146 37 12, ok cancel
}
on *:dialog:grater:init:0: {
hmake warn 50
hmake kill 50
hmake kline 50
hmake gline 50
if ( $isfile($+(",$scriptdirwarn.hsh,")) ) hload warn $+(",$scriptdirwarn.hsh,")
if ( $isfile($+(",$scriptdirkill.hsh,")) ) hload kill $+(",$scriptdirkill.hsh,")
if ( $isfile($+(",$scriptdirkline.hsh,")) ) hload kline $+(",$scriptdirkline.hsh,")
if ( $isfile($+(",$scriptdirgline.hsh,")) ) hload gline $+(",$scriptdirgline.hsh,")
did -a grater 100 Warn
did -a grater 100 Kill
did -a grater 100 Kline
did -a grater 100 Gline
}
on *:dialog:grater:close:0: {
hsave -o warn $+(",$scriptdirwarn.hsh,")
hsave -o kill $+(",$scriptdirkill.hsh,")
hsave -o kline $+(",$scriptdirkline.hsh,")
hsave -o gline $+(",$scriptdirgline.hsh,")
hfree warn
hfree kill
hfree kline
hfree gline
unset %grater.*
}
on *:dialog:grater:sclick:5: {
grater.dialog.who
}
on *:dialog:grater:sclick:6: {
var %x = 1
var %z = 1
var %selected = $did(grater,11,0).sel
while ( %x <= %selected ) {
if ( $hfind(warn,$gettok($did(grater,11).seltext,2,32)) != $null ) {
did -uk grater 11 $did(grater,11).sel
inc %x
}
else {
set %noticenicks $addtok($(%noticenicks,2),$gettok($did(grater,11).seltext,1,32),44)
hadd warn $gettok($did(grater,11).seltext,2,32)
did -d grater 11 $did(grater,11,1).sel
if ( %z == 10 ) || ( %x == %selected ) {
notice %noticenicks %grater.warn.notice
unset %noticenicks
var %z = 1
}
inc %x
inc %z
}
}
$iif( %noticenicks != $null , notice %noticenicks %grater.warn.notice )
}
on *:dialog:grater:sclick:7: {
var %x = 1
var %selected = $did(grater,11,0).sel
while ( %x <= %selected ) {
echo -s kill $gettok($did(grater,11).seltext,1,32) %grater.kill.reason
hadd kill $gettok($did(grater,11).seltext,2,32)
did -d grater 11 $did(grater,11,1).sel
inc %x
}
}
on *:dialog:grater:sclick:8: {
var %x = 1
var %selected = $did(grater,11,0).sel
while ( %x <= %selected ) {
kline $gettok($did(grater,11).seltext,1,33) %grater.kline.time %grater.kline.reason
hadd kline $gettok($did(grater,11).seltext,2,32)
did -d grater 11 $did(grater,11,1).sel
inc %x
}
}
on *:dialog:grater:sclick:9: {
var %x = 1
var %selected = $did(grater,11,0).sel
while ( %x <= %selected ) {
gline $gettok($did(grater,11).seltext,1,33) %grater.gline.time %grater.gline.reason
hadd gline $gettok($did(grater,11).seltext,2,32)
did -d grater 11 $did(grater,11,1).sel
inc %x
}
}
on *:dialog:grater:sclick:100: {
did -r grater 101
var %x = 1
var %lines = $hget($did(grater,100).seltext,0).item
while ( %x <= %lines ) {
did -a grater 101 $hget($did(grater,100).seltext,%x).item
inc %x
}
}
;#Group For Check
#whobadidentcheck off
raw 352:*: {
if ( $dialog(grater) ) && ( $(%badident,2) isin $3 ) {
did -a grater 11 $6 $+(*,$chr(33),$3,@,$4)
}
halt
}
raw 315:*: {
.disable #whobadidentcheck
unset %badident
halt
}
#whobadidentcheck end
Just a note, the G-rater warn notice thing, typing /identd on will not immediately change your identd (you have to reconnect for it to take effect), and also may not work on other IRC clients. The /chgident is a server command and therefore will work on all clients and it immediately changes their identd.