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.

Run command to connect to the IRC network.

Help for those learning Tcl or writing their own scripts.
Post Reply
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Run command to connect to the IRC network.

Post by juanamores »

I tried 2 different ways, in the eggdrop.conf and performing a TCL.
In the conf I works, but I always run only the 1st order, the other not.
The TCL directly does not work on my network irc.irc-hispano.org
eggdrop.conf

Code: Select all

set init-server {
putserv "MODE $botnick +R"
putserv "MODE $botnick +i"
}
TCL:

Code: Select all

proc evnt:init_server {type} {
  global $botnick
  putquick "MODE $botnick +i"
  putquick "MODE $botnick +R"
  putquick "PRIVMSG chan :identify #mychannel mypassword"
  putquick "PRIVMSG chan :identify #mychannel1 mypassword1"
  putquick "PRIVMSG chan :identify #mychannel2 mypassword2" 
} 
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

global botnick 
or use $::botnick dirrectly
Once the game is over, the king and the pawn go back in the same box.
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

Thanks caesar, was a typing mistake :D
But, TCL not work.
The funny thing is that in the conf only work the first lines. :P
The other lines do not throw an error, I looked directly from the eggdrop -n, simply ignored.
set init-server {
putquick "MODE $botnick +R"
putquick "PRIVMSG chan :identify #mychannel mypass"

putquick "PRIVMSG chan :identify #mychannel1 mypass1"
putquick "PRIVMSG chan :identify #mychannel2 mypas2"
putquick "MODE $botnick +i"

}
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
User avatar
CrazyCat
Revered One
Posts: 1306
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

You don't send the PRIVMSG to the good destination:

Code: Select all

set init-server {
   putquick "MODE $::botnick +Ri"
   putquick "PRIVMSG #mychannel :identify mypass"
   putquick "PRIVMSG #mychannel1 :identify mypass1"
   putquick "PRIVMSG #mychannel2 :identify mypas2"
}
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

The destination of the message is correct, the bot chan. :D
This bot is in charge of everything relating to identify channels on my network.
In fact, the first identification is performed correctly.
The variable is also correct, in fact, the R mode gives you trouble.
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
User avatar
CrazyCat
Revered One
Posts: 1306
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Oh, if chan is a bot, ok.
Peharps it ignores yours because of flood. Try using a slower queue to send your commands, as putserv or puthelp.
Another way, if you can modify chan, change its flood parameters.
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

CrazyCat wrote:Oh, if chan is a bot, ok.
Peharps it ignores yours because of flood. Try using a slower queue to send your commands, as putserv or puthelp.
Another way, if you can modify chan, change its flood parameters.
It is a good idea that you propose, but that he had already tried before using putserv and puthelp commands instead of putquick not work.
And with respect to flood parameters, should not affect, because it is the bot itself that sends commands to the server, it can´t autoflood.
Unless there are flood parameters in my irc network, preventing execute all commands together.
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

At last I saw a error !!!

Code: Select all

proc evnt:init_server {type} {
  global botnick
   puthelp "PRIVMSG chan :identify #mychannel mypass"
   puthelp "PRIVMSG chan :identify #mychannel1 mypass1" 
   putserv "MODE $botnick +i"
} 
putlog "Init bot..... initialized"
20:54 :  mybot ¦ [20:54:18] Tcl error in script for 'init-server':
20:54 :  mybot ¦ [20:54:18] missing "
EDIT: Fixed!
I needed nothing more and nothing less than the bind command to activate the process. XD

Code: Select all

bind evnt - "init-server" evnt:init_server
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
User avatar
CrazyCat
Revered One
Posts: 1306
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

LOL !

I didn't think to ask you about the bind :)
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

The fault was mine, I thought it was activated automatically to connect to the IRC network, without using the bind. :P
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
Post Reply