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.

some help needed

Old posts that have not been replied to for several years.
c
crazy-nic
Voice
Posts: 19
Joined: Wed Jul 02, 2003 12:44 am

some help needed

Post by crazy-nic »

hmm..... can someone help me like i wan my bot to say someting like on !help
it will say in msg
<botnick>hello
<botnick>how may i help you

something like tat

note: i dun wan everything in the same line.i want it separate lines
how is it so i hope you guys could help me out.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

bind pub m !help proc:name

and create the proc.
c
crazy-nic
Voice
Posts: 19
Joined: Wed Jul 02, 2003 12:44 am

Post by crazy-nic »

bind pub m !help help
proc help {nick host handle chan text} {
putserv "Privmsg $nick :Hello"
Putserv "Privmsg $nick :how may i help you?"
}

is it like tat?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

yes, but before u ask.. u have to try.
c
crazy-nic
Voice
Posts: 19
Joined: Wed Jul 02, 2003 12:44 am

Post by crazy-nic »

thanks it works.... thanks alot.....
c
crazy-nic
Voice
Posts: 19
Joined: Wed Jul 02, 2003 12:44 am

Post by crazy-nic »

hi there i'll like to ask if i would like to only excute the command when an unknown user which is a voice or op can use the commands what should i do

bind pub - !hello hellop

proc hellop {{nick uhost hand channel rest} {
global botnick
puthelp "PRIVMSG $nick :hello there your channel +v/+o"
}

only Voice ad ops can use the commands if non voice or ops in channel then the command will not take effect.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

hope that this is to some help

Code: Select all

bind pub - !ohelp ohelp:pub 

proc ohelp:pub {nick uhost hand chan arg} { 
  if {[isop $nick $chan] == 1} { 
    putserv "NOTICE $nick :line1" 
    putserv "NOTICE $nick :line2" 
    putserv "NOTICE $nick :line3" 
  } else { 
    putserv "NOTICE $nick :Dude you don't got acces to that list !!" 
  } 
}

bind pub - !help help:pub 

proc help:pub {nick uhost hand chan arg} { 
  if {[isvoice $nick $chan] == 1} { 
    putserv "NOTICE $nick :line1" 
    putserv "NOTICE $nick :line2" 
    putserv "NOTICE $nick :line3" 
  } else { 
    putserv "NOTICE $nick :Dude you don't got acces to that list !!" 
  } 
}
Or both seperate msg same trigger

Code: Select all

bind pub - !help help:pub 

proc help:pub {nick uhost hand chan arg} { 
  if {[isop $nick $chan] == 1} { 
    putserv "NOTICE $nick :line1" 
    putserv "NOTICE $nick :line2" 
    putserv "NOTICE $nick :line3" 
  } 
  if {[isvoice $nick $chan] == 1} { 
    putserv "NOTICE $nick :line1" 
    putserv "NOTICE $nick :line2" 
    putserv "NOTICE $nick :line3" 
  } else { 
    putserv "NOTICE $nick :Dude you don't got acces to that list !!" 
  } 
}
or both same trigger same msg

Code: Select all

bind pub - !help help:pub 

proc help:pub {nick uhost hand chan arg} {
  set line1 "your msg"
  set line2 "your msg"
  set line3 "your msg"
  if {[isop $nick $chan] == 1} {
    putserv "NOTICE $nick :$line1" 
    putserv "NOTICE $nick :$line2" 
    putserv "NOTICE $nick :$line3" 
  } 
  if {[isvoice $nick $chan] == 1} { 
    putserv "NOTICE $nick :$line1" 
    putserv "NOTICE $nick :$line2" 
    putserv "NOTICE $nick :$line3" 
  } else { 
    putserv "NOTICE $nick :Dude you don't got acces to that list !!" 
  } 
}
Last edited by Ofloo on Sun Aug 10, 2003 4:23 am, edited 2 times in total.
XplaiN but think of me as stupid
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

if the server supports halfop you can also add "ishalfop" ;)
XplaiN but think of me as stupid
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

u can make it shorter like this:

Code: Select all

if {[isop $nick $chan] || [ishalfop $nick $chan ] || [isvoice $nick $chan] } {
 putserv....
} else {
 putserv....
}
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

true and not true that only counts for the last one :p cause with the other 2 ones you can set an different msg for ops and voiced users and first one you can also change the trigger so .. you should keep that in mind, but true for the last one its shorter

oh and tnx for pointing that out cause i was wondering what the syntax was for that ;)
XplaiN but think of me as stupid
c
crazy-nic
Voice
Posts: 19
Joined: Wed Jul 02, 2003 12:44 am

Post by crazy-nic »

Why i cannot make it into on message then the command works?

i cant seem to make it work

bind msg m .join pub_join

proc pub_join {n u h c a} {
set chan [lindex $a 0]
if {![string match #* $chan]} {
puthelp "privmsg $n :$n: Channel must have a # in front."
return 0
}
channel add $chan
puthelp "privmsg $nick :Roger that! $nick."
}
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

whats that ? its not a msg on joine eh it seems ur verrifiying something is a channel ?

its a msg join script from i what i can tell
To make the bot join a channel

if you want an on join script

you should use

Code: Select all

bind join - * join:pub

proc join:pub {nick uhost handle channel} { 
...
but why use ops .. cause an user is only op after joining the channel not on joining it .. beter use on mode or something so if he gets opped he gets the msg ..

or if thats not what you mean plz specify cause your being little unclear
XplaiN but think of me as stupid
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

no, I guess what he wants is a script that makes the bot join a new channel when a master msg it .join #channel

so I think this should be it:

Code: Select all

bind msg m .join pub_join 

proc pub_join {nick uhost hand arg} {
set chan [lindex [split $arg] 0]
 if {[string match $chan "#*"]} {
  channel add $chan
} else {
 puthelp "PRIVMSG $nick :$chan is invalid, it should have # infron of it"
}
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Suggestion

Post by user »

'catch' the 'channel add' and display the error message instead of doing the manual #* match. There are more prefixes than just "#", and coding it this way will leave the boring stuff to the eggdrop :P
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I know there are better ways, but I couldn't figure out how.

how to catch the channel add ?
Locked