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.

basic scripting help

Help for those learning Tcl or writing their own scripts.
Post Reply
o
osx
Voice
Posts: 3
Joined: Sun Aug 20, 2006 11:30 am

basic scripting help

Post by osx »

Code: Select all

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 :P
I
IRCNick
Halfop
Posts: 64
Joined: Wed Oct 12, 2005 9:43 pm
Location: Germany
Contact:

Post by IRCNick »

Use putserv instead of putquick
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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

 tag when posting logs, code
o
osx
Voice
Posts: 3
Joined: Sun Aug 20, 2006 11:30 am

Post by osx »

thx :D

anyone know how i can get the bot to msg all operators on the channel?
m
monie089
Halfop
Posts: 76
Joined: Sat Jul 29, 2006 11:13 pm

Post by monie089 »

try onotice it notices the ops
New server irc.NintendoXG.com come and visit
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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

 tag when posting logs, code
m
monie089
Halfop
Posts: 76
Joined: Sat Jul 29, 2006 11:13 pm

Post by monie089 »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

use this:

Code: Select all

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

 tag when posting logs, code
o
osx
Voice
Posts: 3
Joined: Sun Aug 20, 2006 11:30 am

Post by osx »

hoe does i get thet to work with

Code: Select all

proc pub:wallpaper {nickname hostname handle channel text} {
 putquick "NOTICE $nickname :Wallpaper: yor reqest is sent to an admin :)" 
 }
i know im newb :P
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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

 tag when posting logs, code
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Code: Select all

putquick "MSG ops :$nick has requested a template" 
AFAIK, MSG is not a valid IRCd command, you need to use PRIVMSG.
Post Reply