| View previous topic :: View next topic |
| Author |
Message |
osx Voice
Joined: 20 Aug 2006 Posts: 3
|
Posted: Sun Aug 20, 2006 11:42 am Post subject: basic scripting help |
|
|
| Code: |
bind pub -|- "!cmd" pub:commands
bind pub -|- "!request" pub:request
bind pub -|- "!hp" pub:hp
bind pub -|- "!template" pub:template
bind pub -|- "!signature" pub:signature
bind pub -|- "!wallpaper" pub:wallpaper
bind pub -|- "!voice" pub:voice
bind join -|- {*} pub:join
proc pub:join {nickname hostname handle channel} {
putquick "NOTICE $nickname :type !cmd for a list of commands."
}
proc pub:commands {nickname hostname handle channel text} {
putquick "NOTICE $nickname :commands are as follows:"
putquick "NOTICE $nickname :!request - to request a design"
putquick "NOTICE $nickname :!hp - our home page"
putquick "NOTICE $nickname :!voice - gives you voice :) "
}
proc pub:request {nickname hostname handle channel text} {
putquick "NOTICE $nickname :request commands:"
putquick "NOTICE $nickname :!teamplate - A home page layout"
putquick "NOTICE $nickname :!wallpaper - a wallpaper"
putquick "NOTICE $nickname :!signature - A forum signature"
}
proc pub:hp {nickname hostname handle channel} {
putquick "NOTICE $nickname :Homepage: www.ninja-gfx.freeehostia.com"
}
proc pub:template {nickname hostname handle channel} {
putquick "NOTICE $nickname :Template: your request is sent to an admin :)"
putquick "MSG ops :$nick has requested a template"
}
proc pub:signature {nickname hostname handle channel} {
putquick "NOTICE $nickname :signature: yor reqest is sent to an admin :)"
putquick "NOTICE ops : $nick har requesta signatur"
}
proc pub:wallpaper {nickname hostname handle channel} {
putquick "NOTICE $nickname :Wallpaper: yor reqest is sent to an admin :)"
putquick "MSG ops :$nick has requested a Wallpaper"
}
proc pub:voice {nickname hostname handle channel} {
putquick "MODE +v $nickname"
}
|
the script is basic, but im noob. cant get the commands to work :S what am i doing wrong? the !cmd and !request commands are the only ones who actualy works... any suggestions? sry for my bad english  |
|
| Back to top |
|
 |
IRCNick Halfop
Joined: 12 Oct 2005 Posts: 64 Location: Germany
|
Posted: Sun Aug 20, 2006 12:34 pm Post subject: |
|
|
| Use putserv instead of putquick |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Aug 20, 2006 12:44 pm Post subject: |
|
|
you forgot the text parameter in the procs that don't work _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
osx Voice
Joined: 20 Aug 2006 Posts: 3
|
Posted: Sun Aug 20, 2006 1:25 pm Post subject: |
|
|
thx
anyone know how i can get the bot to msg all operators on the channel? |
|
| Back to top |
|
 |
monie089 Halfop
Joined: 29 Jul 2006 Posts: 76
|
Posted: Sun Aug 20, 2006 1:36 pm Post subject: |
|
|
try onotice it notices the ops _________________ New server irc.NintendoXG.com come and visit |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Aug 20, 2006 1:45 pm Post subject: |
|
|
| monie089 wrote: | | try onotice it notices the ops |
that won't work unless the ircd supports that command - and major ircds don't support it _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
monie089 Halfop
Joined: 29 Jul 2006 Posts: 76
|
Posted: Sun Aug 20, 2006 1:46 pm Post subject: |
|
|
| demond wrote: | | monie089 wrote: | | try onotice it notices the ops |
that won't work unless the ircd supports that command - and major ircds don't support it |
O ok sorry just disregard that post _________________ New server irc.NintendoXG.com come and visit |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Aug 20, 2006 1:50 pm Post subject: |
|
|
use this:
| Code: |
foreach nick [chanlist $chan] {
if {[isop $nick $chan]} {puthelp "notice $nick :this is op notice"}
}
|
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
osx Voice
Joined: 20 Aug 2006 Posts: 3
|
Posted: Sun Aug 20, 2006 2:12 pm Post subject: |
|
|
hoe does i get thet to work with
| Code: |
proc pub:wallpaper {nickname hostname handle channel text} {
putquick "NOTICE $nickname :Wallpaper: yor reqest is sent to an admin :)"
}
|
i know im newb  |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Aug 20, 2006 4:13 pm Post subject: |
|
|
being a n00b should not prevent you from figuring out that $chan corresponds to $channel _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Mon Aug 21, 2006 3:14 am Post subject: |
|
|
| Code: | | putquick "MSG ops :$nick has requested a template" |
AFAIK, MSG is not a valid IRCd command, you need to use PRIVMSG. |
|
| Back to top |
|
 |
|