This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Protection Bot Request Script With Clonescanner

Old posts that have not been replied to for several years.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Tosser^^ wrote:Also, with the new

if {![matchattr $handle n|n $chan] && ![matchattr $handle m|m $chan] && ![matchattr $handle o|o $chan] && ![matchattr $handle f|f $chan]} {

would i need to add a ![isbotnick $nick] ?
Yeah, so the bot won't apply the protection on itself.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Also, with a $adduser script, can i add something about special characters for this script:

bind pub nm|nmo \$adduser add:user

proc add:user {nick uhost handle chan text} {
adduser [lindex [split $text] 0] [maskhost [getchanhost $nick $chan]]
chattr [lindex [split $text] 0] |+av $chan
puthelp "NOTICE $nick :[lindex [split $text] 0] Was Added Successfully With The Host: [maskhost [getchanhost $nick $chan]] And The Default Flags: +av For $chan"
} else {
puthelp "NOTICE $nick :Error: Wrong Syntax, Or Error While Trying To Add [lindex [split $text] 0] With The Host: [maskhost [getchanhost $nick $chan]]
}

Also can you check if that script is correct aswell, i just made it.
Also can you check this $chattr script:

bind pub nm|nmo \$chattr chattr:user

proc chattr:user {nick uhost handle chan text} {
chattr [lindex [split $text] 0] [lindex [split $text] 1]
puthelp "NOTICE $nick :[lindex [split $text] 0] Was Added With The Flags [lindex [split $text] 1] For $chan"
} else {
puthelp "NOTICE $nick :Error: Wrong Syntax, Or Error While Trying To Add [lindex [split $text] 0] With The Flags [lindex [split $text] 1]
}

Can you check both of them scripts, and the binds to check if they are correct, Thanks!!

I think thats all for now, Thanks!!
r0t3n @ #r0t3n @ Quakenet
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Also, syntax errors. Use:

Code: Select all

bind pub nm|nmo \$adduser add:user 

proc add:user {nick uhost handle chan text} { 
 if {![validuser [lindex [split $text] 0]]} {
  adduser [lindex [split $text] 0] [maskhost $uhost] 
  chattr [lindex [split $text] 0] |+av $chan 
  puthelp "NOTICE $nick :[lindex [split $text] 0] Was Added Successfully With The Host: [maskhost $uhost] And The Default Flags: +av For $chan" 
 } else { 
 puthelp "NOTICE $nick :Error: [lindex [split $text] 0] is already added."
 }
}
and

Code: Select all

bind pub nm|nmo \$chattr chattr:user 

proc chattr:user {nick uhost handle chan text} { 
 chattr [lindex [split $text] 0] [lindex [split $text] 1] 
 puthelp "NOTICE $nick :[lindex [split $text] 0] Was Added With The Flags [lindex [split $text] 1] For $chan" 
}
those elses you had were invalid and can't be applied that way.

PS: I have a commands script that has these commands you're requesting, just incase you're interrested.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

ok, i had a little problem, the bot got banned by another bot on the chan, and hell broke lose. How can i stop this:

* Joins: TosBot
* Tosser^^ sets mode: +o TosBot
* TosBot sets mode: +b *!*@*
* [GBL]-2 sets mode: -b *!*@*
* Tosser^^ sets mode: -o TosBot
* phupz sets mode: +b *!*@*
* phupz sets mode: -o [GBL]-2
* [GBL]-2 was kicked by phupz (phupz)
* Tosser^^ sets mode: -b *!*@*
* Joins: [GBL]-2
* L sets mode: +o [GBL]-2

Please help, thanks!!
r0t3n @ #r0t3n @ Quakenet
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

give the other bot +f flag ?
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

ok, if i give the other bot +f will it stop the +b *!*@* its not banning the bots host, its bans *!*@*
r0t3n @ #r0t3n @ Quakenet
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Also, can i make that $adduser bind this:

botnick adduser nick

so lets say, [-eggdrop-] adduser Tosser^^

then [-eggdrop-] chattr nick +/-flags

and more like [-eggdrop-] addadmin/op/voice nick
and [-eggdrop-] rem or del/admin/op/voice nick
and [-eggdrop-] blackadd nick/host
and [-eggdrop-] blackdel nick/host/number

And could anyone make/help me make a blacklist and a massop/deop/voice/devoice script to trigger on $op/deop/voice/devoice *

Thanks!!
r0t3n @ #r0t3n @ Quakenet
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Request Script By Metroid

Post by r0t3n »

i saw this request script in another post:

Code: Select all

# Configuration

# homechannel where they can request
set setting(home) "#v1per"
# users the channel needs atleast
set setting(needed) "20"
# deny request if there is no Q or L?
set setting(service) "1"
# the flags he wants
set setting(flags) "+ao"

# end of config

# don't touch this setting!
set setting(busy) 0

bind pub -|- !request    request:pub

proc request:pub {nick host hand chan arg} {
  global setting
  # ignore the request because it isn't the request channel
  if {![string equal $chan $setting(home)]} {
   return 0
  }
  if {$setting(busy)} {
   putquick "NOTICE $nick :There is currently already an request in progress."
   return 0
  }
  set channel [lindex [split $arg] 0]
  # tell him he needs to input a channel first
  if {$channel == ""} {
   putquick "NOTICE $nick :Please state the channel you wish to request for."
   return 0
  }
  if {[validchan $channel]} {
   return 0;
  }
  # activate the busy signal so no other requests can be done
  bind RAW -|- 315         request:endofwho
  set setting(busy) 1
  set setting(chan) "$channel"
  set setting(nick) "$nick"
  channel add $channel
}
  
proc request:endofwho {from key arg} {
   global setting
   if {$setting(busy)} {
    if {![onchan $setting(nick) $setting(chan)] || ![isop $setting(nick) $setting(chan)]} {
     set setting(busy) 0
     putquick "NOTICE $setting(nick) :You aren't on $setting(chan) or you're not opped. Request denied."
     channel remove $setting(chan)
     unbind RAW -|- 315         request:endofwho
     return 0
    }
   if {$setting(service)} {
    if {![onchan L $setting(chan)] && ![onchan Q $setting(chan)]} {
     set setting(busy) 0
     putquick "NOTICE $setting(nick) :Q or L was not found on $setting(chan). Request denied."
     channel remove $setting(chan)
     unbind RAW -|- 315         request:endofwho
     return 0
    }
   }
   if {[llength [chanlist $setting(chan)]] < $setting(needed)} {
     set setting(busy) 0
     putquick "NOTICE $setting(nick) :$setting(chan) has less than $setting(needed) users. Request denied."
     channel remove $setting(chan)
     unbind RAW -|- 315         request:endofwho
     return 0
   }
 if {![validuser [nick2hand $setting(nick)]]} {
  adduser $setting(nick) *!*@[lindex [split [getchanhost $setting(nick) $setting(chan)] @] 1]
 } 
  chattr [nick2hand $setting(nick)] |+n $setting(chan)
  putquick "NOTICE $setting(nick) :The request was succesfull. I will stay here. Please give me $setting(flags) on [request:service $setting(chan)]"
  putquick "PRIVMSG $setting(home) :$setting(nick) requested me for $setting(chan). The channel has [llength [chanlist $setting(chan)]] users. And they have the service bot: [request:service $setting(chan)]. Request was accepted."
  unset setting(chan); unset setting(nick)
  set setting(busy) 0
  unbind RAW -|- 315         request:endofwho
  return 1
  }
}

proc request:service {channel} {
  if {[onchan L $channel]} {
    return "L"
  } elseif {[onchan Q $channel]} {
    return "Q"
  }
}
Can anyone mod it so it scans for clones etc, like sicherhiet and chanbot, and send a random bot etc. Thanks!!
r0t3n @ #r0t3n @ Quakenet
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Tosser^^ wrote:its bans *!*@*
You should recheck your configuration files carefully and any scripts you have loaded because eggdrop (under normal conditions) will not set what is effectively a ban on itself and should immediately remove such a ban if set by another user.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

The script i posted was a simple development script, you have to add things yourself. I'm not even sure if it works.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Tosser^^ wrote:Also, can i make that $adduser bind this:

botnick adduser nick

so lets say, [-eggdrop-] adduser Tosser^^

then [-eggdrop-] chattr nick +/-flags

and more like [-eggdrop-] addadmin/op/voice nick
and [-eggdrop-] rem or del/admin/op/voice nick
and [-eggdrop-] blackadd nick/host
and [-eggdrop-] blackdel nick/host/number

And could anyone make/help me make a blacklist and a massop/deop/voice/devoice script to trigger on $op/deop/voice/devoice *

Thanks!!
You're requesting a commands script which already exists in the tcl archive and I already wrote one few weeks ago. If you don't want to use any of those scripts then I believe now you know enough to code what you're requesting, you're requesting a lot and I don't think anyone is going to write all that for you.

As for blacklist, I also wrote such a script few days ago. try it.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

someone told me to use this bind for [botnick] addop [nick]

Code: Select all

bind pub nm|nmo "$::botnick addop" add:op
But that didnt work, oh well
r0t3n @ #r0t3n @ Quakenet
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

just wondering, does your blacklist script blacklist peeps globally and/or channel specific, thanks!!
r0t3n @ #r0t3n @ Quakenet
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Use something like this:

Code: Select all

bind pub - $botnick commands

proc commands {nick uhost hand chan arg} {
 switch -- [lindex [split $arg] 0] {
  "addop" {
    # body here
   }
  "delop" {
    #body here
   }
  # ....
 }
}
tosser^^ wrote:just wondering, does your blacklist script blacklist peeps globally and/or channel specific, thanks!!
it works only on channels that have +blacklist channel flag (.chanset #channel +blacklist).
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

proc add:ban {nick host hand chan text} {
if {![matchattr $handle n|n $chan] && ![matchattr $handle m|m $chan] && ![matchattr $handle |o $chan]} {
putserv "NOTICE $nick :You Have No Access To This Command"
}
}
{
if {[matchattr $handle n|n $chan] || [matchattr $handle m|m $chan] || [matchattr $handle |o $chan]} {
set banned[host] [maskhost [getchanhost [lindex [split $text] 0] $chan]]
set banned[reason] [lindex [split text] 1]
if {$banned[reason] == "''"} {
set banned[reason] No Reason Added...
} else {
newchanban $chan $banned[host] $nick "Banned!! $banned[reason]
putquick "MODE $chan -o+b $nick $banned[host]"
putquick "KICK $chan $nick :Banned!! $banned{reason]"
}
}
}

Theres a error someone, i cant spot it, please check. Also, thanks for that blacklist script, its excellent, and also thanks for the [botnick] <command> [other] bind, Thanks!!
r0t3n @ #r0t3n @ Quakenet
Locked