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.

Adding a Ban Text

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
F
Fraud
Op
Posts: 101
Joined: Mon May 19, 2008 7:57 am

Adding a Ban Text

Post by Fraud »

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

####################################################
# 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)"
}
d
doggo
Halfop
Posts: 97
Joined: Tue Jan 05, 2010 7:53 am
Contact:

Post by doggo »

Code: Select all

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

  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 :)
F
Fraud
Op
Posts: 101
Joined: Mon May 19, 2008 7:57 am

Post by Fraud »

Hello doggo. Thanks, working
Post Reply