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 

Run command to connect to the IRC network.

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


Joined: 15 Mar 2015
Posts: 317

PostPosted: Wed May 27, 2015 9:44 am    Post subject: Run command to connect to the IRC network. Reply with quote

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:
set init-server {
putserv "MODE $botnick +R"
putserv "MODE $botnick +i"
}

TCL:
Code:
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 Smile
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Wed May 27, 2015 10:09 am    Post subject: Reply with quote

Code:

global botnick

or use $::botnick dirrectly
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Wed May 27, 2015 4:37 pm    Post subject: Reply with quote

Thanks caesar, was a typing mistake Very Happy
But, TCL not work.
The funny thing is that in the conf only work the first lines. Razz
The other lines do not throw an error, I looked directly from the eggdrop -n, simply ignored.
Quote:
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 Smile
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Wed May 27, 2015 5:25 pm    Post subject: Reply with quote

You don't send the PRIVMSG to the good destination:
Code:
set init-server {
   putquick "MODE $::botnick +Ri"
   putquick "PRIVMSG #mychannel :identify mypass"
   putquick "PRIVMSG #mychannel1 :identify mypass1"
   putquick "PRIVMSG #mychannel2 :identify mypas2"
}

_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Wed May 27, 2015 6:36 pm    Post subject: Reply with quote

The destination of the message is correct, the bot chan. Very Happy
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 Smile
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Thu May 28, 2015 3:14 am    Post subject: Reply with quote

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.
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Thu May 28, 2015 6:43 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Thu May 28, 2015 7:59 pm    Post subject: Reply with quote

At last I saw a error !!!

Code:
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"


Quote:
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:
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 Smile
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Sun May 31, 2015 3:50 pm    Post subject: Reply with quote

LOL !

I didn't think to ask you about the bind Smile
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Sun May 31, 2015 4:59 pm    Post subject: Reply with quote

The fault was mine, I thought it was activated automatically to connect to the IRC network, without using the bind. Razz
_________________
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 Smile
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