egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need help!

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
sdays
Halfop


Joined: 21 Oct 2006
Posts: 98

PostPosted: Thu Dec 14, 2006 9:09 pm    Post subject: Need help! Reply with quote

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
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Thu Dec 14, 2006 9:51 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Dec 15, 2006 5:06 am    Post subject: Reply with quote

sdays replace your ||s with &&s.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
sdays
Halfop


Joined: 21 Oct 2006
Posts: 98

PostPosted: Fri Dec 15, 2006 8:47 am    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Dec 15, 2006 9:10 am    Post subject: Reply with quote

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
View user's profile Send private message
sdays
Halfop


Joined: 21 Oct 2006
Posts: 98

PostPosted: Fri Dec 15, 2006 9:22 am    Post subject: Reply with quote

Ok it worked thanks. Smile
Back to top
View user's profile Send private message
sdays
Halfop


Joined: 21 Oct 2006
Posts: 98

PostPosted: Sun Dec 17, 2006 9:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sun Dec 17, 2006 10:18 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
sdays
Halfop


Joined: 21 Oct 2006
Posts: 98

PostPosted: Mon Dec 18, 2006 8:15 am    Post subject: Reply with quote

Thanks that worked
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber