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 

Ban every one that has noidentd tcl help

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


Joined: 21 Oct 2006
Posts: 98

PostPosted: Wed Jan 31, 2007 2:00 pm    Post subject: Ban every one that has noidentd tcl help Reply with quote

This dose nothing i want it to ban every one that has no ident, can some one help thx.

Code:

set yourchan "#channel"
bind join - * badident

proc badident {nick uhost hand chan} {
  if {![isbotnick $nick] && [botisop $chan]} {
    if {"$uhost" == "*!*~*@*"} {
      putserv "MODE $yourchan +b $uhost"
      putserv "KICK $yourchan $nick :Sorry but you have no identd. Ident must be enabled to join, try opening port 113 on your router to your PC and reconnect to a server!"
    }
  }
}
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Wed Jan 31, 2007 2:15 pm    Post subject: Reply with quote

use string match instead.
Code:
if {[string match ~*@* $uhost]} {
Back to top
View user's profile Send private message
sdays
Halfop


Joined: 21 Oct 2006
Posts: 98

PostPosted: Thu Feb 01, 2007 4:03 am    Post subject: Reply with quote

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

Code:

set yourchan "#channel"
set noflagban "fmo|omf"
setudef int banid
set tempban 10
bind join - $yourchan* badident

proc badident {nick uhost hand chan} {
  global yourchan noflagban tempban
  if {([botisop $chan]) && (![isop $nick $chan]) && (![isvoice $nick $chan]) && (![matchattr $hand $noflagban $chan]) && ([onchan $nick $chan])} {
    set count "[expr [channel get $chan banid] + 1]"
    channel set $chan banid "$count"
    if {[string match ~*@* $uhost]} {
      putserv "MODE $yourchan +b $uhost"
      putserv "KICK $yourchan $nick :Put kick msg here $count"
      timer $tempban [putserv {MODE $yourchan -b $uhost}]
    }
  }
}
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Thu Feb 01, 2007 7:37 am    Post subject: Reply with quote

Try this:
Usage:
To enable: type .chanset #yourchan +noidentd in the partyline
To disable: type .chanset #yourchan -noidentd in the partyline

Code:
set noidentd(excempt) "fmo|omf"
set noidentd(bantime) "30"; # Bantime in seconds
set noidentd(kickmsg) "You need identd enabled to join this channel - Count: :count:"
setudef flag noidentd
setudef int noidentd_id

bind join -|- {*} noidentd:join

proc noidentd:join {nick host hand chan} {
  global noidentd
  if {![channel get $chan noidentd]} { return }
  if {![botisop $chan] && [matchattr $hand $noidentd(excempt) $chan] && [isop $nick $chan] && [isvoice $nick $chan]} { return }
  channel set $chan noidentd_id "[set count [expr [channel get $chan noidentd_id] + 1]]"
  regsub -all :count: $noidentd(kickmsg) $count reason
  putserv "MODE $chan +b $host"
  putserv "KICK $chan $nick :$reason"
  utimer $noidentd(bantime) [list pushmode $chan -b $host]
}

_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Thu Feb 01, 2007 1:38 pm    Post subject: Reply with quote

Looks like tosser still doesn't exactly know what he's doing.

Code:

set noident(exempt)  "fmo|omf"
set noident(bantime) 10; # Ban time in minutes. (I see no reason to ban for mere seconds)
set noident(kickmsg) "You need identd enabled to join this channel."
# I don't see the point in some lame counter so let's not include it.

setudef flag noident

bind join -|- * noident:join

proc noident:join {nick host hand chan} {
  global noident
  if {![botisop $chan] || ![channel get $channel noident] || [matchattr $hand $noident($exempt) $chan] || ![string match ~*@* $host]} { return 0 }
  putserv "MODE $chan +b [set host *![string map [list "~" "*"] $host]]"
  putserv "KICK $chan $nick :$noident(kickmsg)"
  timer $noidentd(bantime) [list pushmode $chan -b $host]
}


Also, You would find that tossers code would not have worked very well as he doesn't even check the ident.

Enable it with .chanset #channel +noident.

It should work exactly as wanted Smile
Back to top
View user's profile Send private message
sdays
Halfop


Joined: 21 Oct 2006
Posts: 98

PostPosted: Fri Feb 02, 2007 8:36 am    Post subject: Reply with quote

hmm i tryed editing the bot bans the ops friends etc none of them codes works...
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Fri Feb 02, 2007 1:58 pm    Post subject: Reply with quote

You need to restart the bot.
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 -> Scripting Help 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