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.

Commands don't working [(Re)Solved]

General support and discussion of Eggdrop bots.
Post Reply
p
prppedro
Voice
Posts: 5
Joined: Sun Jan 18, 2009 7:56 pm

Commands don't working [(Re)Solved]

Post by prppedro »

Hi all =p

I re-installed my eggdrop via apt-get today to work in a five chan's of freenode... Ok, let's me tell the problem (ok, is a noob question, but I'm stucked here): My bot works great, I can DCC, the bot connects, recognize the onwers, and, i'm added a script:

Code: Select all

bind pubm - "#*" msg:pubm;proc msg:pubm {n u h c a} {
	if {[string equal -nocase "!:p" $a]} {putserv "privmsg $c :hi $n :D"
	} elseif {[string equal -nocase "!net" $a]} {putserv "privmsg $c: Net? Or Networking"}}
The bot respond to !:p command... but don't respond to !net, and (too) don't respond to no one other command, like .help. .say, .whois in the channel. .help, .say, .whois for sample, works only in DCC chat...

Better saying:
The bot don't handle any public command, with exception of the !:p...

I just searched in the Google, and in the forum (before I register), but I see no resolution for my problem.

I tried:
<prppedro> .chanset +seen
<Ruffles> Successfully set modes { +seen } on #c4ll.
<Ruffles> [23:51] #prppedro# chanset #c4ll +seen
<prppedro> chattr +N
<Ruffles> <prppedro> chattr +N
<prppedro> .chattr +N
<Ruffles> No such user!

Ruffles is the bot name :twisted: :p

Anyone have the solution for this?
Cheers,
Att. Pedro[/code]
Last edited by prppedro on Wed Jan 21, 2009 11:13 am, edited 1 time in total.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

As for !net, you've made a small typo:

Code: Select all

putserv "privmsg $c: Net? Or Networking"
Should be

Code: Select all

putserv "privmsg $c :Net? Or Networking"
For other public commands, check the value of exclusive-binds setting, as setting this to 1 prevents any further checks for pub-bindings whenever a pubm binding matches.
NML_375
p
prppedro
Voice
Posts: 5
Joined: Sun Jan 18, 2009 7:56 pm

Post by prppedro »

Thanks,

Let's me try changue the script... and...
For other public commands, check the value of exclusive-binds setting, as setting this to 1 prevents any further checks for pub-bindings whenever a pubm binding matches.
How to make this? I'm sorry, but I'm extreme newbie in eggdrop...



Att. Pedro
p
prppedro
Voice
Posts: 5
Joined: Sun Jan 18, 2009 7:56 pm

Post by prppedro »

Any people?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Check your config-file.
And please, alittle patience, if you don't mind...
NML_375
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

This is my example, hopefully it will help. The link, will help to understand more about my example. Give it a try :)

Code: Select all

set command_chars "! . @"  ;# chars to remove when testing for a command.

bind pubm - * mycommands:pubm

proc mycommands:pubm {nick host handle channel text} {
 global command_chars
 set command [string trimleft [lindex [split $text] 0] "$command_Chars"]  ;# Gives us the command (Example: '!say' part with any command 'i.e !,@,.')
 set string [join [lrange [split $text] 1 end]]                           ;# Gives us the text that was after the command
                                                                          ;# Example: !say hello -> 'hello' would be the 'string'.
 switch command {
  "hello" {puthelp "privmsg $channel :hello $string!"; return 1}
  "goodbye" {puthelp "privmsg $channel :goodbye $string!"; return 1}
  "seeyah" {
   puthelp "privmsg $channel :see yah!"
   puthelp "privmsg $channel :\001ACTION waves to $string!\001"
   return 1
  }
  default {puthelp "notice $nick :unknown command \002$command\002"; return 1}
 }
}
This would allow us to use commands "!hello @hello .hello" to get the bot to say hello to someone and as above.
TCL CMD: switch
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

One more thing, that I unfortunately overlooked in your first query:
prppedro wrote:don't respond to no one other command, like .help. .say, .whois in the channel. .help, .say, .whois for sample, works only in DCC chat...
There are no native public commands such as those you describe. These are only made available through DCC chat, with the exception of a limited set that is available through private msg with a separate syntax (no . prefix), and usually requiring password to authenticate the user in question each time the command is issued.

Natively, eggdrop actually does not have any public commands whatsoever; the seen/gseen-modules will add a few public commands, such as !seen. Other than that, for any public commands, you'll need other script-packages and/or custom modules.
NML_375
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

http://www.egghelp.org/using.htm and
/msg <bot> HELP
as well :wink:
p
prppedro
Voice
Posts: 5
Joined: Sun Jan 18, 2009 7:56 pm

Post by prppedro »

Hi :twisted:
Roger that...

The command Net is ok now...
TCL_not_TK (strange nick =p), the /msg always worked great, but is horrible use /msg, . commands are more simple.

And realy thanks for the script, but:
<Ruffles> [14:38] Tcl error [mycommands:pubm]: can't read "command_Chars": no such variable
<Ruffles> [14:38] Tcl error [mycommands:pubm]: can't read "command_Chars": no such variable
<Ruffles> [14:38] Tcl error [mycommands:pubm]: can't read "command_Chars": no such variable

in dcc...

Now the bot only parses the !:p and !net...

The module seen are always loaded, but the comand !seen don't is parsed...:roll: .

Realy thanks, but I having no mode to put the bot to parse public commands... In the channel exist the HAL9500, a operator bot, this bot parses .help, .version... But ok, I'm going to search for public com. scripts and I post here...

Att. Pedro
p
prppedro
Voice
Posts: 5
Joined: Sun Jan 18, 2009 7:56 pm

Post by prppedro »

I'm Sorry for the Double Post, but I download few scripts, and now are works great...
prppedro@etch:~/eggs$ ls
cp cp.zip incith-google-1.8.8g weather425.tcl welcome_autogreet welcome_autogreet.zip

Welcome script, incith (Google Commands), wheater by Dragon and "Comandos Publicos"...

Now all are working :twisted:

Thanks for help here!
Post Reply