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.

Need help!

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
s
sdays
Halfop
Posts: 98
Joined: Sat Oct 21, 2006 4:46 am

Need help!

Post by sdays »

Can someone help me with this script please this script makes the bot ban it self owners on bot....

Code: Select all

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
  }
}
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Try

Code: Select all

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
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

sdays replace your ||s with &&s.
s
sdays
Halfop
Posts: 98
Joined: Sat Oct 21, 2006 4:46 am

Post by sdays »

Hmm when some one joins another channel it bans them in the channel i have the script on.

Code: Select all

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"
  }
}
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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: Select all

bind join - "#channel *" proc:ban
This would only trigger when ppl join #channel
NML_375
s
sdays
Halfop
Posts: 98
Joined: Sat Oct 21, 2006 4:46 am

Post by sdays »

Ok it worked thanks. :)
s
sdays
Halfop
Posts: 98
Joined: Sat Oct 21, 2006 4:46 am

Post by sdays »

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.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Try:

Code: Select all

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
s
sdays
Halfop
Posts: 98
Joined: Sat Oct 21, 2006 4:46 am

Post by sdays »

Thanks that worked
Post Reply