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 

Trouble with a ctcp join channel script

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


Joined: 16 Jul 2002
Posts: 69
Location: Bangor, Pennsylvania

PostPosted: Wed Jan 30, 2013 2:55 am    Post subject: Trouble with a ctcp join channel script Reply with quote

I'm having a bit of trouble, I'm trying to script it so that when a ctcp from a +A global flag user is sent to the bot that is "join #channel", the bot should set -inactive for that channel and join the channel. The script I have that doesn't seem to work is currently this and I'm not sure what I'm doing wrong after I have tried a number of things.

Code:
bind ctcp A|- "join-chan *" secallchan

proc secallchan {nick uhost hand dest keyword text} {
    set chantojoin [lindex $keyword 1]
    channel set $chantojoin -inactive
}
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Wed Jan 30, 2013 5:47 am    Post subject: Re: Trouble with a ctcp join channel script Reply with quote

mcdarby wrote:
I'm having a bit of trouble, I'm trying to script it so that when a ctcp from a +A global flag user is sent to the bot that is "join #channel",

I suspect that the ctcp command must be one word.
Quote:

the bot should set -inactive for that channel and join the channel.

While you can set channel options when adding a channel, it isn't necessary if you want -inactive, as that is the default.

Experiment with this:
Code:

bind ctcp A|- "JOIN" secallchan
proc secallchan {nick uhost hand dest keyword text} {
   set chantojoin [lindex [split $text] 0]
   channel add $chantojoin
}

I tested it briefly, and it worked.

You can play around with substituting in these lines, for the current
"channel add" line:
Code:

   channel add $chantojoin +inactive

Code:

   channel add $chantojoin -inactive

I hope this helps.

Reference:
http://www.eggheads.org/support/egghtml/1.6.21/tcl-commands.html
http://www.peterre.info/characters.html
Back to top
View user's profile Send private message
mcdarby
Halfop


Joined: 16 Jul 2002
Posts: 69
Location: Bangor, Pennsylvania

PostPosted: Wed Jan 30, 2013 7:43 pm    Post subject: Reply with quote

Okay, there is something really wrong here, I tried your script and it seems to only work when I have -|- for the bind flag. Anything else doesn't seem to work even though I have the client added to the bot with the matching hostmask. Also doesn't seem to op the client when I put +n and +a global flags to it and have client join the channel the bot is op in. I attempted to reinstall the bot in case something is wrong, but that did not appear to fix it.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Wed Jan 30, 2013 8:20 pm    Post subject: Reply with quote

mcdarby wrote:

...
Anything else doesn't seem to work even though I have the client added to the bot with the matching hostmask. Also doesn't seem to op the client when I put +n and +a global flags to it and have client join the channel the bot is op in. I attempted to reinstall the bot in case something is wrong, but that did not appear to fix it.


I really question that the bot recognizes you.

Try this:
Join a channel that the bot is in.
In the partyline, do:
.channel #channel
and view the results. Find yourself. Examine the info... if the bot recognizes you there will be a big N just to the right of the Join time, and left of the Idle time column.

Perhaps someone else will also jump in here with ideas for you.
Back to top
View user's profile Send private message
mcdarby
Halfop


Joined: 16 Jul 2002
Posts: 69
Location: Bangor, Pennsylvania

PostPosted: Wed Jan 30, 2013 10:22 pm    Post subject: Reply with quote

Okay, after checking a few things including .channel to see who and what is being recognized as what userfile entry, it turns out I have to question how this eggdrop is reading it. Apparently, I have an A entry after an S entry showing up in .match * and I had an AllUser entry with *!*@* for the host and had +U to three different channels. I believe the reason I have that entry is because I was using the +U flag with another tcl script to kick ban on spammy links in certain channels while exempting those on my userfile. After temporary deleting that and re-adding that, which appears to put it at the end of the .match * output, it seems to fix the recognition problem. I have to check the .conf again and sees if there is an entry in it for alphabetizing the userfile and I may have to start using ZZ- entries if it is reading the userfile from beginning to end, to try to fix any conflicts.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
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