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 

Adding a Ban Text

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


Joined: 19 May 2008
Posts: 101

PostPosted: Fri Aug 20, 2010 2:16 pm    Post subject: Adding a Ban Text Reply with quote

Hello. I wanted to ask if u could help me, adding a Text for the User (Ban -message) and a Channel Output , if somebody gets banned by flyby (e.g.: banned by flyby Channel). atm its just the ban and the user and the chan does not know why he/she gets banned. Thanks a lot

Code:
####################################################
# by wiebe @ QuakeNet
#
####################################################

setudef flag flyby
setudef int flyby-trigger
setudef int flyby-bantime

####################################################
# flyby:part
####################################################
bind part -|- * flyby:part
proc flyby:part { n u h c {m ""}} {
  if {![validchan $c]} { return 0 }
  if {[isbotnick $n]} { return 0 }
  if {![botisop $c]} { return 0 }
  if {![channel get $c flyby]} { return 0 }
  if {[matchattr $h bfvlomn|fvlomn $c]} { return 0 }
  if {[isop $n $c]} { return 0 }
  if {[ishalfop $n $c]} { return 0 }
  if {[isvoice $n $c]} { return 0 }
  if {[matchban $n!$u $c]} { return 0 }
  set t [channel get $c flyby-trigger]
  if {$t < 0} { set t 10; channel set $c flyby-trigger $t }
  set d [expr [clock seconds] - [getchanjoin $n $c]]
  if {$d > $t} { return 0 }
  set l [channel get $c flyby-bantime]; set e "flyby.tcl"
  if {$l < 5} { set l 10; channel set $c flyby-bantime 10 }
  set m "*!$u"; set r "You joined and left within a very short time."
  if {[string match "~*@*" $u] || [string match "*.users.quakenet.org" $u]} {
    set m "*!*@[lindex [split $u @] 1]"
  }
  if {![string equal [info procs newchanban:ban] ""]} { newchanban:ban $c $m $e $r $l]
  } else { newchanban $c $m $e $r $l }
}


set scriptdb(flyby) {
  "ban users who part shortly after joining, +flyby (enable), flyby-trigger (ban if user parts within X seconds), flyby-bantime (ban for X minutes)"
}
Back to top
View user's profile Send private message
doggo
Halfop


Joined: 05 Jan 2010
Posts: 97

PostPosted: Sun Aug 22, 2010 7:22 pm    Post subject: Reply with quote

Code:
  if {![string equal [info procs newchanban:ban] ""]} { newchanban:ban $c $m $e $r $l]
  } else { newchanban $c $m $e $r $l }
}


try changing to

Code:
  if {![string equal [info procs newchanban:ban] ""]} { newchanban:ban $c $m $e $r $l]
puthelp "privmsg $n : YOUR MSG HERE"
  } else { newchanban $c $m $e $r $l }
}


should send the nick that was banned a privmsg, just change YOUR MSG HERE to your own Smile
_________________
NON geeky!! http://gotcode4u.com/
Back to top
View user's profile Send private message Visit poster's website
Fraud
Op


Joined: 19 May 2008
Posts: 101

PostPosted: Mon Aug 23, 2010 5:23 pm    Post subject: Reply with quote

Hello doggo. Thanks, working
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