Professional Protect bot.

Do you have script in mind but no ability to make it, type in what it should do, and you might be lucky.

Re: Professional Protect bot.

Postby i3s » Tue Jun 23, 2009 11:45 am

zNigel wrote:
Sumsar wrote:Did you add yourself to the userlist? (if not, try /addgowner <nickname-as-owner>)



Try this, as Sumsar said..



Oh, didn't see this, yea, thx now it works, but now I got another problem.
As I can see i need settings.ini, where can I find this or do I have to create one?
This is settings for $protect on/off
And where should I put this? :P

And now I can see when I'm adding someone to the bot($adduser owner nick or $adduser nick owner) nothing happens, maybe I need other .ini's?

thx for the help everyone, just this now and it should work
i3s
 

Re: Professional Protect bot.

Postby Cristian » Tue Jun 23, 2009 2:14 pm

Problem 1.)
settings.ini should be created, when you use the $protect command.

Problem 2.)
what does the bot say, any errors?
do you receive a notice (done)?

to add someone.
$adduser <nickname> op/master/owner and the nickname have to be on channel.
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: Professional Protect bot.

Postby i3s » Tue Jun 23, 2009 2:41 pm

Sumsar wrote:Problem 1.)
settings.ini should be created, when you use the $protect command.

Problem 2.)
what does the bot say, any errors?
do you receive a notice (done)?

to add someone.
$adduser <nickname> op/master/owner and the nickname have to be on channel.


well yes, i got settings.ini now but what about it? it doesnt protect the channel when my friend is deoping/kicking anyone :(

yes, i'm getting "(16:36:22)  -› [notice from BOTNICK]: Done."

and when im using $adduser <nick> oP/master/owner nothing happends, and yes, he's in my channel..

no idea why it's so fucked up, does it work for you?
i heard from Lymmel that this script is totally bugged
i3s
 

Re: Professional Protect bot.

Postby zNigel- » Tue Jun 23, 2009 3:38 pm

i3s wrote:
Sumsar wrote:Problem 1.)
settings.ini should be created, when you use the $protect command.

Problem 2.)
what does the bot say, any errors?
do you receive a notice (done)?

to add someone.
$adduser <nickname> op/master/owner and the nickname have to be on channel.


well yes, i got settings.ini now but what about it? it doesnt protect the channel when my friend is deoping/kicking anyone :(

yes, i'm getting "(16:36:22)  -› [notice from BOTNICK]: Done."

and when im using $adduser <nick> oP/master/owner nothing happends, and yes, he's in my channel..

no idea why it's so fucked up, does it work for you?
i heard from Lymmel that this script is totally bugged



Firstly, Lymmel doesnt know shit.. Secondly, i'll take a look and see what i can improve.
zNigel-
 

Re: Professional Protect bot.

Postby i3s » Tue Jun 23, 2009 5:24 pm

zNigel wrote:
i3s wrote:
Sumsar wrote:Problem 1.)
settings.ini should be created, when you use the $protect command.

Problem 2.)
what does the bot say, any errors?
do you receive a notice (done)?

to add someone.
$adduser <nickname> op/master/owner and the nickname have to be on channel.


well yes, i got settings.ini now but what about it? it doesnt protect the channel when my friend is deoping/kicking anyone :(

yes, i'm getting "(16:36:22)  -› [notice from BOTNICK]: Done."

and when im using $adduser <nick> oP/master/owner nothing happends, and yes, he's in my channel..

no idea why it's so fucked up, does it work for you?
i heard from Lymmel that this script is totally bugged



Firstly, Lymmel doesnt know shit.. Secondly, i'll take a look and see what i can improve.


okay ;p thx rly much :)
i3s
 

Re: Professional Protect bot.

Postby Futz0r » Wed Jul 01, 2009 6:22 am

first start, I saw was this PROBLEM:

i'll test the script and saw this!
Code: Select all
[08:17:30 - 01:07:2009] (@Futz0r) $adduser alfnbabz master
* /if: invalid format (line 37, script9.txt)

Code: Select all
[08:18:48 - 01:07:2009] (@Futz0r) $deluser alfnbabz
* /if: invalid format (line 50, script9.txt)

Code: Select all
[08:21:06 - 01:07:2009]  ›› [[Futb0t] (Futb0t@x1-6-00-11-2f-86-36-78.k168.webspeed.dk)] Syntax: $adduser <nick/ident> <level> - where <level> can be: owner, master, op, voice, banned.
[08:21:18 - 01:07:2009] (@Futz0r) $adduser Skilzo banned

and the error is:
Code: Select all
* /if: invalid format (line 37, script9.txt) AGAIN!

and the scrips is:

Code: Select all
 --- script --- line 37

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 }

 --- script --- line 50

    if (!$readini(users.ini,$chan,$address($2,1)) { notice $nick The requested user ( $+ $2 $+ ) is not known on the current channel ( $+ $chan $+ ) | halt }




After restart a mIRC:

i'll op my bot
Code: Select all
* /if: invalid format (line 171, script9.txt)

--- script --- line 171
  if ($nick == Q) ||  ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick,32)) || ($protect($chan) != on) { halt


and yes my bot is authed

and i saw more errors :D

Code: Select all
* You were kicked from #futz0r.dk by Futz0r (Enough for today rookie (144))
-
* /if: invalid format (line 193, script9.txt)

--- script --- line 193

  if ($nick == Q) ||  ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick,32)) || ($protect($chan) != on) { halt }



OH MY GOD!

this script is full af "errors"

Code: Select all
[08:34:44 - 01:07:2009]  :::: Topic: Futz0r changed it to '|F| Welcome to #Futz0r.dk |F| News: Nothing |F| vdfsdf sdfsdf'
* /if: invalid format (line 222, script9.txt)


--- script --- line 222
  if ($nick == Q) ||  ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick,32)) || ($protect($chan) != on) { writeini settings.ini $chan topic $chan($chan).topic | notice $nick Topic Saved. | halt }

and i'm take my white flag up!

Code: Select all
[08:36:19 - 01:07:2009]  ›› [Q (TheQBot@CServe.quakenet.org)] Done.
[08:36:35 - 01:07:2009] [ø] ChanMode: Futz0r sets mode: [-bbbb] *!*@fableb0t.users.quakenet.org *!*@bmakb.users.quakenet.org *!*@COCOZ.users.quakenet.org *!*@taidos.users.quakenet.org

* /if: invalid format (line 213, script9.txt)
-
* /if: invalid format (line 213, script9.txt)
-
* /if: invalid format (line 213, script9.txt)
-
* /if: invalid format (line 213, script9.txt)
-

--- script --- line 213

  if ($nick == Q) ||  ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick,32)) || ($protect($chan) != on) { halt }


and YES i have protec on to check ;)
Futz0r
 

Re: Professional Protect bot.

Postby zNigel- » Wed Jul 01, 2009 11:56 am

Pretty good error report there m8.. Makes it alot easier to fix it :)
zNigel-
 

Re: Professional Protect bot.

Postby Futz0r » Thu Jul 02, 2009 12:52 am

but i know, there are more bugs!

but it is on
Code: Select all
If coding 


there are bugs on all :/
Futz0r
 

Re: Professional Protect bot.

Postby Cristian » Fri Jul 03, 2009 5:52 pm

yeah, nice error log, it seems that the author forgot some close parentheses.

I closed the parentheses, and it should work properly now.

Code: Select all
;;$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 protect {
  !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:#: {
  if ($nick == Q) ||  ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick,32))) || ($protect($chan) != on) { halt }
  mode $chan -oo $nick $opnick
  /msg Q chanlev $chan $nick -ao
  hadd cbans $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)) || ($protect($chan) != on) { halt }
  mode $chan -o+o $nick $opnick
  hadd -m cbans $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))) || ($protect($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)) || ($protect($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))) || ($protect($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
  hadd cbans $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))) || ($protect($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
  hadd cbans $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)
}
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: Professional Protect bot.

Postby i3s » Fri Jul 03, 2009 7:57 pm

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. :x


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
i3s
 

PreviousNext

Return to Mirc Scripting Request

Who is online

Users browsing this forum: Bing [Bot] and 0 guests

cron