Pegasus Projects Contains:
-User and chan modes
-Advanced Shitlist
-friendlist
-seen
-mIRC protection by pass
-exception list
Download the complete code with the help files
http://www.4shared.com/file/6IjBcI2A/zpegasus.html
this script was one of the first script i made, and i know
i know there are 1 thousand ways to do this script... but i keep it like the original code
Bugs report? Report please
dialog zPegasus {
title "projeto pegasus"
size -1 -1 210 100
option dbu
tab "user", 20, 5 7 190 80
edit "", 4, 55 35 30 10, tab 20 autohs
text "enter a nick:", 5, 55 25 45 10, tab 20
text "enter a reason:", 12, 90 25 45 10, tab 20
radio "kick", 6, 12 45 30 10, tab 20
radio "kick/ban", 7, 12 55 30 10, tab 20
edit "", 8, 8 35 30 10, tab 20 autohs
text "enter a room:", 9, 8 25 45 10, tab 20
button "kick", 10, 8 70 30 10, tab 20
button "kick/ban", 11, 8 70 30 10, tab 20
edit "", 13, 90 35 45 10, tab 20
radio "op", 14, 55 45 21 10, tab 20
button "op", 15, 8 70 30 10, tab 20
radio "deop", 16, 55 55 25 10, tab 20
button "deop", 17, 8 70 30 10, tab 20
radio "kick/ban/temporary", 18, 80 45 70 10, tab 20
text "time in minutes:", 19, 135 25 50 10, tab 20
edit "", 30, 140 35 30 10, tab 20
button "kick/ban/temporary", 31, 8 70 70 10, tab 20
radio "quiet", 32, 80 55 30 10, tab 20
button "quiet", 33, 8 70 30 10, tab 20
button "?", 100, 147 75 30 10, tab 20
radio "voice", 201, 110 55 30 10, tab 20
button "voice", 202, 8 70 30 10, tab 20
radio "devoice", 203, 140 55 30 10, tab 20
button "devoice", 204, 8 70 30 10, tab 20
radio "default", 205, 110 73 30 10, tab 20
tab "shitlist", 21
text "enter a nick:", 42, 8 25 45 10, tab 21
edit "", 43, 8 35 30 10, tab 21 autohs
edit "", 105, 43 35 30 10, tab 21 autohs
text "reason:", 106, 48 25 30 10, tab 21
button "add", 44, 80 35 30 10, tab 21 flat
button "del", 45, 110 35 30 10, tab 21 flat
list 46, 8 48 100 37, tab 21 sort size extsel hsbar vsbar
button "list", 47, 110 50 30 10, tab 21
button "clear", 48, 110 61 30 10, tab 21
button "?", 101, 147 75 30 10, tab 21
tab "friendlist", 22
text "enter a nick:", 51, 8 25 45 10, tab 22
edit "", 52, 8 35 30 10, tab 22 autohs
button "add", 53, 40 35 30 10, tab 22
button "del", 54, 70 35 30 10, tab 22
list 55, 8 48 100 37, tab 22 sort size hsbar vsbar
button "list", 56, 110 50 30 10, tab 22
button "clear", 57, 110 61 30 10, tab 22
button "?", 102, 147 75 30 10, tab 22
tab "modes", 23
edit "", 62, 8 35 30 10, tab 23 autohs
text "enter a room:", 63, 8 25 45 10, tab 23
edit "", 64, 50 35 30 10, tab 23
text "enter the modes:", 65, 50 25 50 10, tab 23
button "set", 66, 8 65 30 10, tab 23
button "modes", 67, 50 65 30 10, tab 23
button "clear", 68, 80 65 30 10, tab 23
edit "", 69, 100 35 30 10, tab 23
text "type a pass:", 70, 100 25 50 10, tab 23
text "type the limit:", 71, 100 25 50 10, tab 23
radio "+l", 72, 100 50 15 10, tab 23
button "set", 73, 8 65 30 10, tab 23
radio "+k", 74, 120 50 15 10, tab 23
button "set", 75, 8 65 30 10, tab 23
radio "default", 76, 145 50 50 10, tab 23
button "?", 103, 147 75 30 10, tab 23
tab "seen", 24
text "enter a nick:", 77, 8 25 45 10, tab 24
edit "", 78, 8 35 30 10, tab 24 autohs
button "seen", 79, 40 35 30 10, tab 24
edit "", 80, 8 48 147 37, tab 24 read multi hsbar vsbar
button "clear", 81, 156 75 30 10, tab 24
button "clear seenlist", 82, 100 35 50 10, tab 24
tab "pass", 25
text "type a pass", 304, 8 25 45 10, tab 25
edit "", 305, 8 35 30 10, tab 25 pass autohs
edit "", 306, 8 48 100 37, tab 25 read multi
radio "set", 307, 110 48 30 10, tab 25
radio "unset", 308, 110 61 30 10, tab 25
button "set", 309, 140 48 30 10, tab 25
radio "default", 34, 143 61 30 10, tab 25
button "?", 104, 147 75 30 10, tab 25
tab "info", 26
edit "", 302, 10 25 170 60, tab 26 read multi
tab "exceptions", 27
text "enter a nick:", 317, 8 25 45 10, tab 27
edit "", 318, 8 35 30 10, tab 27 autohs
button "add", 319, 40 35 30 10, tab 27
button "del", 320, 70 35 30 10, tab 27
list 321, 8 48 100 37, tab 27 sort size hsbar vsbar
button "list", 322, 110 50 30 10, tab 27
button "clear", 323, 110 61 30 10, tab 27
button "?", 324, 147 75 30 10, tab 27
box "projeto pegasus:", 2, 2 2 201 95
text "Projeto pegasus", 3, 155 86 45 8
menu "help", 315
item "pegasus", 316, 315
}
alias zPegasus { dialog -m zPegasus zPegasus }
on *:dialog:zPegasus:sclick:*:{
if ( $did == 6 ) { /did -h zPegasus 11,15,17,19,30,31,33,202,204 | /did -v zPegasus 4,10,5,13,12,8 }
if ( $did == 7 ) { /did -h zPegasus 10,15,17,19,30,31,33,202,204 | /did -v zPegasus 11,4,5,13,12,8 }
if (( $did == 10 ) && ( $did(8) != $null ) && ( $did(4) != $null )) { /kick $did(8)text $did(4)text $did(13)text }
var %chan.zPegasus $eval( $did( zPegasus,8)text)
var %nick.zPegasus $eval( $did( zPegasus,4)text)
if (( $did == 11 ) && ( $did(8) != $null ) && ( $did(4) != $null )) { /ban -k $did(8)text $did(4)text $did(13)text }
if ( $did == 14 ) { /did -h zPegasus 11,10,12,13,17,19,30,31,33,202,204 | /did -v zPegasus 4,15,5 }
if (( $did == 15 ) && ( $did(8) != $null ) && ( $did(4) != $null )) { /chanserv op $did(8)text $did(4)text }
if ( $did == 16 ) { /did -h zPegasus 10,11,12,13,15,19,30,31,33,202,204 | /did -v zPegasus 4,5,8,17 }
if (( $did == 17 ) && ( $did(8) != $null ) && ( $did(4) != $null )) { /chanserv deop $did(8)text $did(4)text) }
if ( $did == 18 ) { /did -h zPegasus 10,11,12,13,15,17,33,202,204 | /did -v zPegasus 4,5,8,19,30,31 }
if (( $did == 31 ) && ( $did(8) != $null ) && ( $did(4) != $null )) { /ban -u $+ $eval( $calc( $did( zPegasus, 30)*60)text) %chan.zPegasus %nick.zPegasus 3 | /kick %chan.zPegasus %nick.zPegasus banned for $eval( $calc( $did( zPegasus, 30)text)) minute(s) }
set %time.zPegasus $eval( $calc( $did( zPegasus, 30)*60)text)
if ( $did == 32 ) { /did -h zPegasus 10,11,12,13,15,17,31,202,204 | /did -v zPegasus 4,5,19,30,33 }
if (( $did == 33 ) && ( $did(8) != $null ) && ( $did(4) != $null )) { /mode %chan.zPegasus + $+ b ~ $+ q $+ : $+ %nick.zPegasus | /mode %chan.zPegasus + $+ b ~ $+ n $+ : $+ %nick.zPegasus | /timer 1 %time.zPegasus /mode %chan.zPegasus - $+ b ~ $+ q $+ : $+ %nick.zPegasus | /timer 1 %time.zPegasus /mode %chan.zPegasus - $+ b ~ $+ n $+ : $+ %nick.zPegasus }
if (( $did = 44 ) && ( $did(43) != $null)) { var %slist_motivo = writeini listanegra.ini $did(43) lista $did(105)
var %slist_padrao writeini listanegra.ini $did(43) lista added to shitlist
var %slist_add $did(43)text | write slist.txt %slist_add | /did -ar pegasus 46 added " $+ $did(43)text $+ " to shitlist
$iif($did(105), %slist_motivo, %slist_padrao)
var %x = 1
while (%x <= $chan(0)) {
if ($did(43) ison $chan(%x)) {
mode $chan(%x) +b $address($did(43),2) | kick $chan(%x) $did(43) $iif($did(105) != $null, $did(105), added to shitlist)
}
inc %x
}
}
var %nicks $did(43)text
if (( $did == 45 ) && ( $did(46).seltext )) { write -ds $did(46).seltext slist.txt | /did -r zPegasus 46 | /loadbuf -o zPegasus 46 slist.txt }
if (( $did == 47 ) && ( $exists(slist.txt) )) { /did -r zPegasus 46 | /loadbuf -o zPegasus 46 slist.txt }
if ( $did == 48 ) { write -c slist.txt | /did -ar zPegasus 43 | /did -ar zPegasus 46 shitlist sucefully cleared }
if (( $did == 53 ) && ( $did(52) != $null)) { write flist.txt $did(52)text | /did -ar zPegasus 55 added " $+ $did(52)text $+ " to friendlist }
if (( $did == 54 ) && ( $did(55).seltext )) { write -ds $did(55).seltext flist.txt | /did -r zPegasus 55 | /loadbuf -o zPegasus 55 flist.txt }
if (( $did == 56 ) && ( $exists(flist.txt) )) { /did -ar zPegasus 55 | /loadbuf -o zPegasus 55 flist.txt }
if ( $did == 57 ) { write -c flist.txt | /did -ar zPegasus 52 | /did -ar zPegasus 55 friendlist sucefully cleared }
if ( $did == 100 ) { //run zuserinfo.txt }
if ( $did == 101 ) { //run zslistinfo.txt }
if ( $did == 102 ) { //run zflistinfo.txt }
if ( $did == 103 ) { //run zmodesinfo.txt }
if ( $did == 104 ) { //run zsenhainfo.txt }
if ( $did == 67 ) { /zcmodes }
if ( $did == 68 ) { /clear $active | /did -h zPegasus 69,70,71,73,75 | /did -u zPegasus 72,74 | /did -v zPegasus 64,65,66 | /mode $active - $+ sntTCMmnNRGlLpAOuViScKkz | /mode $active - $+ k %chan.zPegasus.senha }
if (( $did == 66 ) && ( $did(62) != $null ) && ( $did(64) != $null ) && ( $me isop $active )) { /mode $did(62)text $did(64)text }
if ( $did == 72 ) { /did -h zPegasus 64,65,66,70,75 | /did -v zPegasus 69,71,73 | /did -ar zPegasus 69 }
if (( $did == 73 ) && ( $did(62) != $null ) && ( $did(69) != $null ) && ( $me isop $active )) { /mode $did(62)text + $+ l $did(69)text }
if ( $did == 74 ) { /did -h zPegasus 64,65,66,71,73 | /did -v zPegasus 69,70,75 | /did -ar zPegasus 69 }
if (( $did == 75 ) && ( $did(62) != $null ) && ( $did(69) != $null ) && ( $me isop $active )) { /mode $did(62)text + $+ k $did(69)text | set %chan.zPegasus.senha $did(69) }
if ( $did == 76 ) { /did -u zPegasus 72,74 | /did -h zPegasus 69,70,71,73,75 | /did -v zPegasus 64,65,66 }
if ( $did = 201 ) { /did -h zPegasus 10,11,12,13,15,17,19,30,31,33,204 | /did -v zPegasus 4,5,202 }
if (( $did = 202 ) && ( $did(8) != $null ) && ( $did(4) != $null )) { /chanserv voice $did(8)text $did(4)text ) }
if ( $did == 203 ) { /did -h zPegasus 10,11,12,13,15,17,19,30,31,202 | /did -v zPegasus 4,5,204 }
if (( $did == 204 ) && ( $did(8) != $null ) && ( $did(4) != $null )) { /chanserv devoice $did(8)text $did(4)text }
if ( $did == 205 ) { /did -u zPegasus 6,7,14,15,16,18,32,201,203 | /did -h zPegasus 4,5,10,11,12,13,15,17,19,30,31,33,202,204 }
if ( $did == 81 ) { /did -ar zPegasus 80,78 | /did -ar zPegasus 80 Search for }
if ( $did == 82 ) { write -c zseenlist.ini | /did -ar zPegasus 80 seenlist sucefully cleared }
if ( $did == 307 ) { /did -e zPegasus 305 | /did -v zPegasus 309 }
if ( $did == 308 ) { /did -b zPegasus 305 | /did -h zPegasus 309 | /did -ar zPegasus 305 | /did -ar zPegasus 306 pass unset | /senha off | unset %senha }
if (( $did == 309 ) && ( $did(305) != $null )) { /did -ar zPegasus 306 pass was set to $did(305)text | /senha on | set %senha $did(305)text }
if ( $did == 34 ) { /did -b zPegasus 305 | /did -h zPegasus 309 | /did -ar zPegasus 305,306 }
if ($did == 79) { var %r = $readini(zseenlist.ini, $did(78), Seen) | did -ar zpegasus 80 $iif(%r, %r, no such nick was found ) }
if (( $did == 322 ) && ( $exists(elist.txt) )) { /did -ar zPegasus 321 | /loadbuf -o zPegasus 321 elist.txt }
if (( $did == 319 ) && ( $did(318) != $null )) { write elist.txt $did(318) | did -ar zPegasus 321 | /loadbuf -o zPegasus 321 elist.txt }
if (( $did == 320 ) && ( $did(321).seltext )) { write -ds $did(321).seltext elist.txt | did -ar zPegasus 321 | /loadbuf -o zPegasus 321 elist.txt }
if ( $did == 323 ) { write -c elist.txt | did -ar zPegasus 321 exceptionslist sucefully cleared }
if ( $did == 324 ) { //run zelistinfo.txt }
}
on *:dialog:zPegasus:menu:316:{
/run zprojeto_zPegasus.txt
}
on *:dialog:zPegasus:init:*:{
/did -h zPegasus 4,10,11,5,13,12,15,17,19,30,31,33,69,70,71,202,204,309
/did -ar zPegasus 302 { Some of functions need and was tested on servers that use chanserv and nickserv $crlf $crlf $crlf _Teen_ }
/did -c zPegasus 34,76,205
/did -ar zPegasus 80 Search for
/did -ar zPegasus 46 enter a nick
/did -ar zPegasus 55 enter a nick
/did -b zPegasus 305
/did -ar zPegasus 321 enter a nick
}
on *:dialog:zPegasus:edit:*:{
if ( $did == 78 ) { /did -ar zPegasus 80 Search for " $+ $did(78)text $+ " ? }
if ( $did(78) == $null ) { /did -ar zPegasus 80 Search for }
if ( $did(43) == $null ) { /did -ar zPegasus 46 enter a nick }
if ( $did(43) != $null ) { /did -ar zPegasus 46 }
if ( $did(52) == $null ) { /did -ar zPegasus 55 enter a nick }
if ( $did(52) != $null ) { /did -ar zPegasus 55 }
if ( $did(318) == $null ) { /did -ar zPegasus 321 enter a nick }
if ( $did(318) != $null ) { /did -ar zPegasus 321 }
}
on *:nick:{
if (($exists(slist.txt)) && ($read(slist.txt, w, $newnick) == $newnick )) {
var %x = 1
while (%x <= $chan(0)) {
if ($me isop $chan(%x)) {
mode $chan(%x) +b $address($newnick,2)
kick $chan(%x) $newnick $readini(listanegra.ini, $read(slist.txt, w, $newnick), lista)
}
inc %x
}
}
if ($file(zseenlist.ini).size <= 58000) { writeini zseenlist.ini $Nick Seen $Nick changed nick to $NewNick $remove(( $+ $address($newnick,0) $+ ) , *!) $+ , at $Time(HH:nn:ss) on $Date(dd/mm/yy) $+ . }
elseif (($file(seenlist.ini).size > 58000) || ($file(zseenlist.ini).size > 58000)) { write -c seenlist.ini | write -c zseenlist.ini }
}
on *:kick:#:{
if (($me isop $chan) && ($exists(flist.txt))) {
var %x = 1
while (%x <= $lines(flist.txt)) {
if ($read(flist.txt, %x) == $knick) {
/kick # $nick This nick is protected
}
inc %x
}
}
if ($file(seenlist.ini).size <= 58000) { writeini seenlist.ini $kNick Seen $kNick $remove(( $+ $address($knick,0) $+ ) , *!) foi kickado do # por $Nick $remove(( $+ $address($nick,0) $+ ) , *!) $+ , às $Time(HH:nn:ss) de $Date(dd/mm/yy) $+ . }
if ($file(zseenlist.ini).size <= 58000) { writeini zseenlist.ini $kNick Seen $kNick $remove(( $+ $address($knick,0) $+ ) , *!) was kicked from # by $Nick $remove(( $+ $address($nick,0) $+ ) , *!) $+ , at $Time(HH:nn:ss) on $Date(dd/mm/yy) $+ . }
elseif (($file(seenlist.ini).size > 58000) || ($file(zseenlist.ini).size > 58000)) { write -c seenlist.ini | write -c zseenlist.ini }
if (($knick == $me) && ($nick != $me)) {
set -u10 %kchan $chan
set -u10 %KnickA $nick
//chanserv unban %kchan
join %kchan
set -u10 %Knick on
}
}
on *:join:#:{
if (($me isop $chan) && ($nick != $me) && ($exists(slist.txt))) {
var %x = 1
while (%x <= $lines(slist.txt)) {
if (($read(elist.txt, w, $nick) != $nick)) && ($read(slist.txt, %x) ison $chan) {
mode $chan +b $address($read(slist.txt, %x),2)
kick $chan $read(slist.txt, %x) $readini(listanegra.ini, $read(slist.txt, %x), lista)
}
elseif ($read(slist.txt, %x) isin $gettok($address($nick,2),2,64) && ($read(elist.txt, w, $nick) != $nick)) {
mode $chan +b $address($nick,2)
kick $chan $nick $readini(listanegra.ini, $read(slist.txt, %x), lista)
}
inc %x
}
}
if ($file(seenlist.ini).size <= 58000) { writeini seenlist.ini $Nick Seen $Nick $remove(( $+ $address($nick,0) $+ ) , *!) joined on channel # at $Time(HH:nn:ss) on $Date(dd/mm/yy) $+ . }
if ($file(zseenlist.ini).size <= 58000) { writeini zseenlist.ini $Nick Seen $Nick $remove(( $+ $address($nick,0) $+ ) , *!) joined on chan # at $Time(HH:nn:ss) on $Date(dd/mm/yy) $+ . }
elseif (($file(seenlist.ini).size > 58000) || ($file(zseenlist.ini).size > 58000)) { write -c seenlist.ini | write -c zseenlist.ini }
if ((%Knick == on) && (%Knicka != $me)) {
mode %kchan -oee+bee %Knicka $address(%Knicka,2) %Knicka $address(%Knicka,2) $address($me,2) $me
kick %kchan %Knicka You dont have permission to do it
}
}
alias zcmodes {
/echo -a 12+s: secret
/echo -a 12+n: external messages not allowed
/echo -a 12+m: moderated channel
/echo -a 12+p: private channel
/echo -a 12+C: ctcp's not allowed
/echo -a 12+T: external notices not allowed
/echo -a 12+S: not allowed colors
/echo -a 12+u: auditorium
/echo -a 12+k: channel pass is required
/echo -a 12+l: channel limit
/echo -a 12+R: registered nicks only
/echo -a 12+t: only op's can change the topic
/echo -a 12+N: nick change is not allowed
/echo -a 12+M: only registered nicks can talk
/echo -a 12+q: quit messages is not allowed
/echo -a 12+K: knocks not allowed
/echo -a 12+V: invites not allowed
/echo -a 12+i: channel for invited only
}
alias senha {
if ($1 == on ) {
set %zPegasus.senha on
//echo -a 12 pass set
}
elseif ($1 == off ) {
set %zPegasus.senha off
//echo -a 12 pass unset
}
}
on *:disconnect:{
unset %zPegasus.aceita
}
menu * {
Pegasus:{
/zpegasus
}
}