i3s wrote:Sumsar wrote:yeah, nice error log, it seems that the author forgot some close parentheses.
I closed the parentheses, and it should work properly now.
Nah, it doesn't.![]()
- Code: Select all
* Loaded script 'C:\Program Files\mIRC\protect.mrc'
Done.
(21:55:29) -› Unknown command (users.ini)
I'm getting this error when i'm doing /addgowner nick.
*****************************************************************
EDIT:
Seems like everything is working now, found an little misstake in line 144
- Code: Select all
ban -r $chan $2 $iif(*!*
"iif" ^^
but theres ONE problem now........ $protect on/off doesnt work, nothing happends when i'm doing this and it doesnt protect the channel, no settings.ini created etc.. Hope you can find the problem :F
´* Invalid format: $iif (line 144, r-own.nbs)
-
capurro wrote:$invite
$kick
dont work
;;$adduser op/master/owner
;;$deluser
;;$op
;;$voice
;;$deop
;;$devoice
;;$ban
;;$unban
;;$protect on
i3s wrote:Sumsar wrote:yeah, nice error log, it seems that the author forgot some close parentheses.
I closed the parentheses, and it should work properly now.
Nah, it doesn't.![]()
- Code: Select all
* Loaded script 'C:\Program Files\mIRC\protect.mrc'
Done.
(21:55:29) -› Unknown command (users.ini)
I'm getting this error when i'm doing /addgowner nick.
*****************************************************************
EDIT:
Seems like everything is working now, found an little misstake in line 144
- Code: Select all
ban -r $chan $2 $iif(*!*
"iif" ^^
but theres ONE problem now........ $protect on/off doesnt work, nothing happends when i'm doing this and it doesnt protect the channel, no settings.ini created etc.. Hope you can find the problem :F
;;$adduser op/master/owner
;;$deluser
;;$op
;;$voice
;;$deop
;;$devoice
;;$ban
;;$unban
;;$protect on
alias access {
!return $readini(users.ini,$1,$address($2,1))
}
alias chanlev {
!return $readini(users.ini,$1,$address($2,1))
}
alias userlev {
!return $readini(users.ini,global,$address($1,1))
}
alias chanprotect {
!return $readini(settings.ini,$1,protect)
}
alias addgowner {
writeini users.ini global $address($1,1) owner
echo Done.
}
on *:TEXT:$adduser*:#: {
if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
if (!$2) { notice $nick Syntax: $1 <nick/ident> <level> - where <level> can be: owner, master, op, voice, banned. | halt }
if ($2 !ison $chan) { notice $nick The requested user ( $+ $2 $+ ) is not on the current channel. ( $+ $chan $+ ) | halt }
if ($readini(users.ini,$chan,$address($2,1))) { notice $nick The requested user is already known on the current channel, with level: $v1 - use $!deluser to remove him/her. | halt }
if (!$istok(owner master op voice banned,$3,32)) { notice $nick Invalid level, levels are: owner, master, op, voice, banned. | halt }
writeini users.ini $chan $address($2,1) $3
if ($istok(owner master op,$3,32)) { mode $chan +o $2 }
elseif ($istok(voice,$3,32)) { mode $chan +v $2 }
elseif ($istok(banned,$3,32)) { ban -k $chan $2 $iif(*!*@*.quakenet.org iswm $address($2,2),2,1) You are BANNED from this channel, order by: $nick, on: $date at: $time $+ . | writeini bans.ini $chan $address($2,$iif(*!*@*.quakenet.org iswm $address($2,2),2,1)) You are BANNED from this channel, order by: $nick, on: $date at: $time $+ . }
notice $nick Done.
}
}
on *:TEXT:$deluser*:#: {
if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
if ($2 !ison $chan) { notice $nick The requested user ( $+ $2 $+ ) is not on the current channel. ( $+ $chan $+ ) | halt }
if (!$readini(users.ini,$chan,$address($2,1))) { notice $nick The requested user ( $+ $2 $+ ) is not known on the current channel ( $+ $chan $+ ) | halt }
if ($2 isop $chan) { mode $chan -o $2 }
elseif ($2 isvoice $chan) { mode $chan -v $2 }
remini users.ini $chan $address($2,1)
notice $nick Done.
}
}
on *:TEXT:$op*:#: {
if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
if (!$2) { mode $chan +o $nick | notice $nick Done. | halt }
if ($2 ison $chan) { mode $chan +o $2 | notice $nick Done. | halt }
if (* isin $2) {
var %x = $nick($chan,0)
while (%x) {
var %q = $nick($chan,%x)
if ($2 iswm %q) { var %d = $addtok(%d,$v2,32) }
dec %x
}
mode $chan + $+ $str(o,$numtok($gettok(%d,1-4,32),32))
var %d = $deltok(%d,1-4,32)
}
}
}
on *:TEXT:$deop*:#: {
if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
if (!$2) { mode $chan -o $nick | notice $nick Done. | halt }
if ($2 ison $chan) { mode $chan -o $2 | notice $nick Done. | halt }
if (* isin $2) {
var %x = $nick($chan,0)
while (%x) {
var %q = $nick($chan,%x)
if ($2 iswm %q) { var %d = $addtok(%d,$v2,32) }
dec %x
}
mode $chan - $+ $str(o,$numtok($gettok(%d,1-4,32),32))
var %d = $deltok(%d,1-4,32)
}
}
}
on *:TEXT:$voice*:#: {
if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
if (!$2) { mode $chan +v $nick | notice $nick Done. | halt }
if ($2 ison $chan) && ($access($chan,$nick) != voice) { mode $chan +v $2 | notice $nick Done. | halt }
if (* isin $2) && ($access($chan,$nick) != voice) {
var %x = $nick($chan,0)
while (%x) {
var %q = $nick($chan,%x)
if ($2 iswm %q) { var %d = $addtok(%d,$v2,32) }
dec %x
}
mode $chan + $+ $str(v,$numtok($gettok(%d,1-4,32),32))
var %d = $deltok(%d,1-4,32)
}
}
}
on *:TEXT:$devoice*:#: {
if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
if (!$2) { mode $chan -v $nick | notice $nick Done. | halt }
if ($2 ison $chan) && ($access($chan,$nick) != voice) { mode $chan -v $2 | notice $nick Done. | halt }
if (* isin $2) && ($access($chan,$nick) != voice) {
var %x = $nick($chan,0)
while (%x) {
var %q = $nick($chan,%x)
if ($2 iswm %q) { var %d = $addtok(%d,$v2,32) }
dec %x
}
mode $chan - $+ $str(v,$numtok($gettok(%d,1-4,32),32))
var %d = $deltok(%d,1-4,32)
}
}
}
on *:TEXT:$ban*:#: {
if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
if (!$2) { notice $nick $1 <user> <reason> | halt }
if ($2 == $me) { notice $nick I will not ban myself. | halt }
if ($2 == $nick) { notice $nick I will not ban you. | halt }
ban -k $chan $2 $iif(*!*@*.quakenet.org iswm $address($2,2),2,1) You are BANNED from this channel, order by: $nick, on: $date at: $time $+ .
writeini bans.ini $chan $address($2,$iif(*!*@*.quakenet.org iswm $address($2,2),2,1)) You are BANNED from this channel, order by: $nick, on: $date at: $time $+ .
}
}
on *:TEXT:$unban*:#: {
if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
if (!$2) { notice $nick $1 <user>/<all> | halt }
if ($2 == all) {
mode $chan +b-b *!*@* *!*@*
remini bans.ini $chan
notice $nick Done.
}
ban -r $chan $2 $iif(*!*@*.quakenet.org iswm $address($2,2),2,1)
}
}
on *:TEXT:$version:#: {
var %x = $rand(1,2)
if (%x == 1) { msg $chan I am protect v0.2 by Phil (SilverRain) }
elseif (%x == 2) { describe $chan is protect v0.2 by Phil (SilverRain) }
}
on *:TEXT:$protect*:#: {
if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
if (!$2) { notice $nick Syntax: $1 <on/off/status> | halt }
if ($2 == on) {
writeini settings.ini $chan protect on
notice $nick Done.
}
if ($2 == off) {
writeini settings.ini $chan protect off
notice $nick Done.
}
if ($2 == status) {
notice $nick Protection is currently: $iif($readini(settings.ini,$chan,protect),$readini(settings.ini,$chan,protect),off)
}
}
}
on @!*:OP:#: {
msg $chan Access $access($chan,$nick) - Userlev $userlev($nick)
if ($chr(46) isin $nick) || $len($nick) == 1) { return }
if ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick),32)) || ($chanprotect($chan) != on) { halt }
mode $chan -oo $nick $opnick
/msg Q chanlev $chan $nick -ao
writeini bans.ini $chan $address($nick,1) You are not allowed to OP anyone on $chan - violation on: $date at $time
ban -k $chan $nick 1 You are not allowed to OP anyone on $chan - violation on: $date at $time - by %homechan
}
on @!*:DEOP:#: {
if ($nick == $me) {
msg Q op $chan
}
if ($nick == Q) || ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick),32)) || ($chanprotect($chan) != on) { halt }
mode $chan -o+o $nick $opnick
writeini bans.ini $chan $address($nick,1) You are not allowed to DEOP anyone on $chan - violation on: $date at $time
/msg Q chanlev $chan $nick -ao
ban -k $chan $nick 1 You are not allowed to DEOP anyone on $chan - violation on: $date at $time
}
on @!*:KICK:#: {
if ($nick == Q) || ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick),32)) || ($chanprotect($chan) != on) { halt }
mode $chan -ov $nick $nick
/msg Q chanlev $chan $nick -ao
writeini bans.ini $chan $address($nick,1) You are not allowed to KICK anyone on $chan - violation on: $date at $time
ban -k $chan $nick 1 You are not allowed to KICK anyone on $chan - violation on: $date at $time
}
on @!*:BAN:#: {
if ($nick == Q) || ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick),32)) || ($chanprotect($chan) != on) { halt }
mode $chan -o+b-b $nick $address($nick,1) $banmask
/msg Q chanlev $chan $nick -ao
kick $chan $nick You are not allowed to BAN anyone on $chan - violation on: $date at: $time
writeini bans.ini $chan $address($nick,1) You are not allowed to BAN anyone on $chan - violation on: $date at $time
}
on @!*:UNBAN:#: {
if ($nick == $me) { halt }
if ($nick == Q) || ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick),32)) || ($chanprotect($chan) != on) { halt }
mode $chan -o+b+b $nick $address($nick,1) $banmask
kick $chan $nick You are not allowed to BAN anyone on $chan - violation on: $date at: $time
/msg Q chanlev $chan $nick -ao
writeini bans.ini $chan $address($nick,1) You are not allowed to BAN anyone on $chan - violation on: $date at $time
}
on @!*:TOPIC:#: {
if ($nick == Q) || ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick),32)) || ($chanprotect($chan) != on) { writeini settings.ini $chan topic $chan($chan).topic | notice $nick Topic Saved. | halt }
mode $chan -o+b $nick $address($nick,1)
kick $chan $nick You are not allowed to CHANGE TOPIC on $chan - violation on: $date at $time
/msg Q chanlev $chan $nick -ao
writeini bans.ini $chan $address($nick,1) You are not allowed to CHANGE TOPIC on $chan - violation on: $date at $time
topic $chan $readini(settings.ini,topic,$chan)
}
Return to Mirc Scripting Request
Users browsing this forum: No registered users and 0 guests