IWillNotChange wrote:I need a super simple script.
I need it to kick users who talk in the channel who arent voice or higher, saying that they arent aloud to talk without permission.
...
Code: Select all
# April 14, 2012
# forum user = iwillnotchange
# requested kick on post, if not voiced.
# http://forum.egghelp.org/viewtopic.php?t=18923
#I need a super simple script.
#I need it to kick users who talk in the channel who arent voice or higher, saying that they arent aloud to talk without permission.
# ...
#Thank you in advance.
#########
# Note: Script is active in all channels that bot is in
bind pubm - "*" kicknovoice
proc kicknovoice { nick uhost handle chan text} {
if {[isvoice $nick $chan]} {
return 0
}
if {[isop $nick $chan]} {
return 0
}
putkick $chan $nick "You are not allowed to post in $chan without permission"
return 0
}
IWillNotChange wrote:I need a super simple script.
...
And on a side note, a simple on text !servers reply with
Current list of servers is:
(Ill fill in the rest >.<i cant code but i can do that part haha)
Thank you in advance.
Code: Select all
# April 14, 2012
# forum user = iwillnotchange
# http://forum.egghelp.org/viewtopic.php?p=99188
# ...
# And on a side note, a simple on text !servers reply with
# Current list of servers is:
#(Ill fill in the rest >.<i cant code but i can do that part haha)
# Thank you in advance.
###
# Set the filename/path of the file that will hold the list of servers
set serversfile "scripts/added/testing/serversfile.txt"
bind pub - "!servers" say_servers
proc say_servers {nick uhost handle chan text} {
global serversfile
# Reference: http://forum.egghelp.org/viewtopic.php?t=6885
set fname "$serversfile"
set fp [open $fname "r"]
set data [read -nonewline $fp]
close $fp
set lines [split $data "\n"]
putserv "privmsg $chan :Current list of servers is:"
foreach server $lines {
putserv "privmsg $chan :$server"
}
}
You're welcome.IWillNotChange wrote:Perfect! Thank you very much
will test it out when i get home, but can i ask for one change? For the first one, can it be set to only certian channels?
Code: Select all
# April 14, 2012
# forum user = iwillnotchange
# requested kick on post, if not voiced.
# http://forum.egghelp.org/viewtopic.php?t=18923
#I need a super simple script.
#I need it to kick users who talk in the channel who arent voice or higher, saying that they arent aloud to talk without permission.
# ...
#Thank you in advance.
#########
# Usage: To enable on a given channel: .chanset #channel +novoicekick
# To disable on a given channel: .chanset $channel -novoicekick
setudef flag novoicekick
bind pubm - "*" kicknovoice
proc kicknovoice { nick uhost handle chan text} {
if {![channel get $chan novoicekick]} {
return 0
}
if {[isvoice $nick $chan]} {
return 0
}
if {[isop $nick $chan]} {
return 0
}
putkick $chan $nick "You are not allowed to post in $chan without permission"
return 0
}
Bookmark these then:IWillNotChange wrote: ... but to at least know how it functions and get the general idea to make small fixes would be great, so I really do appreciate it more then you think!
Right after what? What is "that"?IWillNotChange wrote:# Usage: To enable on a given channel: .chanset #channel +novoicekick
# To disable on a given channel: .chanset $channel -novoicekick
so those two, do they get set right after that?
I believe that each channel will default to -novoicekick .And, if I enable them
.chanset #lobby +novoicekick
do I need to set -novoicekick on the rest of the channels its in?
or just set it to the ones i need in it?