| View previous topic :: View next topic |
| Author |
Message |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Sat Sep 23, 2006 5:16 am Post subject: Quick Request |
|
|
Hello guys.
Quick question / request if I may please.
I am looking for something like the following.
(User types this)
(user)whos the [censored] do you think you are son?
Now i have the ircd setup to replace [censored] with censored.
Everyone else sees blah blah (censored) blah blah
What I need is the bot to read every line of the irc channel chat - every channelt he bot is in. and when it see's the word
it puts out the following message
(bot> Please dont use language like that in a public channel.
Can anyone help me out with this please.
cheers
Jamie |
|
| Back to top |
|
 |
monie089 Halfop
Joined: 29 Jul 2006 Posts: 76
|
Posted: Sat Sep 23, 2006 6:19 am Post subject: |
|
|
| Code: |
bind pub - "*censored" censored:check
proc censored:check {nick uhost hand chan text} {
putquick "PRIVMSG $nick :Please don't curse in $chan"
}
|
Something like this. _________________ New server irc.NintendoXG.com come and visit |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Sat Sep 23, 2006 6:20 am Post subject: |
|
|
Not very well described... more confusing...
But i think this is what your looking for:
| Code: | bind pubm - * censored
proc censored {nickname hostname handle channel text} {
if {[string match -nocase *censored* $text]} {
putserv "PRIVMSG $channel :Please dont use language like that in a public channel."
}
} |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Sat Sep 23, 2006 6:44 am Post subject: |
|
|
thanks guys that did the trick nicely.
One more thing to do with this script.
Is it posable to have the following upgrade.
(user) why dont you go <consored> off !!!
(bot) Please dont use that language in a public chanel
but also
(bot) The following consored line was detected "why dont you go <censored> off !!!" $chan.
and the bots says that into our staff channel. this way I can see what the bot flagged the announce for?
something like arg -1 i think its something like that but not sure? does that make sence?
the bot should listen for the cencsored on all channels but report to #staff channel
The bot is an ircop if that makes any difference and its unrealircd if that makes any differnce as well.
cheers guys - your all aces.
Quest |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sat Sep 23, 2006 8:37 am Post subject: |
|
|
| monie089 wrote: | | Code: |
bind pub - "*censored" censored:check
proc censored:check {nick uhost hand chan text} {
putquick "PRIVMSG $nick :Please don't curse in $chan"
}
|
Something like this. |
You shouldn't attempt to make scripts for others since you obviously don't know how a PUB bind works.
also,
| Quote: | (user) why dont you go <consored> off !!!
(bot) Please dont use that language in a public chanel |
Why don't you add that yourself, it's just another line which you then send to your 'staff' channel. |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Sat Sep 23, 2006 10:43 am Post subject: |
|
|
| Code: | bind pubm - * censored
proc censored {nickname hostname handle channel text} {
if {[string match -nocase *censored* $text] && ![string match -nocase #STAFFCHANNEL $channel]} {
putserv "PRIVMSG $channel :Please dont use language like that in a public channel."
putserv "PRIVMSG #STAFFCHANNEL :The following censored line was detected \"$text\" by $nickname on $channel.
}
} |
Change both instances of #STAFFCHANNEL to your staff channel. _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
|