egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

basic scripting help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
osx
Voice


Joined: 20 Aug 2006
Posts: 3

PostPosted: Sun Aug 20, 2006 11:42 am    Post subject: basic scripting help Reply with quote

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 Razz
Back to top
View user's profile Send private message
IRCNick
Halfop


Joined: 12 Oct 2005
Posts: 64
Location: Germany

PostPosted: Sun Aug 20, 2006 12:34 pm    Post subject: Reply with quote

Use putserv instead of putquick
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Aug 20, 2006 12:44 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
osx
Voice


Joined: 20 Aug 2006
Posts: 3

PostPosted: Sun Aug 20, 2006 1:25 pm    Post subject: Reply with quote

thx Very Happy

anyone know how i can get the bot to msg all operators on the channel?
Back to top
View user's profile Send private message
monie089
Halfop


Joined: 29 Jul 2006
Posts: 76

PostPosted: Sun Aug 20, 2006 1:36 pm    Post subject: Reply with quote

try onotice it notices the ops
_________________
New server irc.NintendoXG.com come and visit
Back to top
View user's profile Send private message Send e-mail
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Aug 20, 2006 1:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
monie089
Halfop


Joined: 29 Jul 2006
Posts: 76

PostPosted: Sun Aug 20, 2006 1:46 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Aug 20, 2006 1:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
osx
Voice


Joined: 20 Aug 2006
Posts: 3

PostPosted: Sun Aug 20, 2006 2:12 pm    Post subject: Reply with quote

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 Razz
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Aug 20, 2006 4:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Mon Aug 21, 2006 3:14 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber