| View previous topic :: View next topic |
| Author |
Message |
sdays Halfop
Joined: 21 Oct 2006 Posts: 98
|
Posted: Thu Dec 14, 2006 9:09 pm Post subject: Need help! |
|
|
Can someone help me with this script please this script makes the bot ban it self owners on bot....
| Code: |
set yourchan "#channel"
bind join - * proc:ban
proc proc:ban {nick uhost hand chan} {
global yourchan
if {![matchattr $nick b|b] || ![matchattr $nick n|n] || ![matchattr $nick m|m] || ![matchattr $nick o|o] || ![matchattr $nick f|f]} {
set arg $yourchan
putserv "topic $yourchan http://$nick.justgotOWNED.com"
putserv "mode $yourchan +b $uhost"
putserv "kick $yourchan $nick :http://$nick.justgotOWNED.com"
} else {
putserv "PRIVMSG $nick :$nick You are lucky that you are a friend of mine. You are permitted to stay"
return
}
}
|
|
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Thu Dec 14, 2006 9:51 pm Post subject: |
|
|
Try
| Code: |
bind join - "% #yourchannel *" proc:ban
proc proc:ban {nick uhost hand chan} {
if {![isbotnick $nick] && ![matchattr $hand nmofb|nmof $chan]} {
set text "http://$nick.justgotOWNED.com"
putserv "TOPIC $chan :$text"
putserv "MODE $chan +b $uhost"
putserv "KICK $chan $nick :$text"
} else {
putserv "PRIVMSG $nick :$nick You are lucky that you are a friend of mine. You are permitted to stay"
}
} |
Not tested. _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
sdays Halfop
Joined: 21 Oct 2006 Posts: 98
|
Posted: Fri Dec 15, 2006 8:47 am Post subject: |
|
|
Hmm when some one joins another channel it bans them in the channel i have the script on.
| Code: |
set yourchan "#channel"
bind join - * proc:ban
proc proc:ban {nick uhost hand chan} {
global yourchan
if {![isbotnick $nick] && ![matchattr $hand nmofb|nmof $chan]} {
set arg $yourchan
set text "http://$nick.justgotOWNED.com"
putserv "TOPIC $yourchan :$text"
putserv "MODE $yourchan +b $uhost"
putserv "KICK $yourchan $nick :$text"
} else {
putserv "PRIVMSG $nick :$nick You are lucky that you are a friend of mine. You are permitted to stay"
}
}
|
|
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Dec 15, 2006 9:10 am Post subject: |
|
|
Use $chan instead of $yourchan in your kicks, etc..
Then either alter your binding to only match for a single channel, or compare $chan to whichever channel(s) you wish for it to operate on...
I'd suggest you go with Tosser^^'s code
Edit: Or actually, Tosser^^'s binding is slightly flawed: use this instead: | Code: | | bind join - "#channel *" proc:ban | This would only trigger when ppl join #channel _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
sdays Halfop
Joined: 21 Oct 2006 Posts: 98
|
Posted: Fri Dec 15, 2006 9:22 am Post subject: |
|
|
Ok it worked thanks.  |
|
| Back to top |
|
 |
sdays Halfop
Joined: 21 Oct 2006 Posts: 98
|
Posted: Sun Dec 17, 2006 9:53 pm Post subject: |
|
|
| I need a script that counts the bans number and it puts it in the topic like http://nick.justgotOwned.com bancouner_here people has been banned. |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Sun Dec 17, 2006 10:18 pm Post subject: |
|
|
Try:
| Code: | setudef int banid
bind join - "#yourchannel *" proc:ban
proc proc:ban {nick uhost hand chan} {
if {![isbotnick $nick] && ![matchattr $hand nmofb|nmof $chan]} {
set text "http://$nick.justgotOWNED.com"
set count "[expr [channel get $chan banid] + 1]"
channel set $chan banid "$count"
putserv "TOPIC $chan :$text $count people has been banned."
putserv "MODE $chan +b $uhost"
putserv "KICK $chan $nick :$text"
} else {
putserv "PRIVMSG $nick :$nick You are lucky that you are a friend of mine. You are permitted to stay"
}
} |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
sdays Halfop
Joined: 21 Oct 2006 Posts: 98
|
Posted: Mon Dec 18, 2006 8:15 am Post subject: |
|
|
| Thanks that worked |
|
| Back to top |
|
 |
|