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.

/who #chan when the bot joins

Old posts that have not been replied to for several years.
Locked
User avatar
Kurupt
Voice
Posts: 26
Joined: Sun Aug 22, 2004 7:57 pm
Location: Hermanstat

/who #chan when the bot joins

Post by Kurupt »

I have a problem. My bots need to join a big channel, big means 900+ ppl on chan. And wen the bot join he do a /who #chan and that make im to get ping timeout. So my question does somebody know how to stop to do /who #chan when he joins or have somebody a patch for something like that.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Eggdrops don't just ping timeout like that. As for /who, the eggdrop doesn't do a /who #channel when they join a channel (else if you are using some tcl which intentionaly does a channel who on join).

They just /list #channel get the nicknames present in a channel as when a normal user, using a mirc client joins a channel and gets the nicks listed in the channel.

To prevent your eggdrop from pinging out, you can use anti-idle scripts:

http://www.egghelp.org/cgi-bin/tcl_arch ... load&id=12
http://www.egghelp.org/cgi-bin/tcl_arch ... load&id=16
http://www.egghelp.org/cgi-bin/tcl_arch ... oad&id=862
http://www.egghelp.org/files/mytcl/aidle1.1.tcl.gz
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

awyeah wrote:As for /who, the eggdrop doesn't do a /who #channel when they join a channel (else if you are using some tcl which intentionaly does a channel who on join).
yes it does

you ever took a peek at the source?
They just /list #channel get the nicknames present in a channel as when a normal user, using a mirc client joins a channel and gets the nicks listed in the channel.
excuse me? /list to get nicks? you've been drinking too much this xmas ;)

no, they don't do /list, that command has nothing to do with nicks

neither does mIRC on join; it does /names - that's why you don't have your IAL (Internal Address List) populated until /who or /userhost; and that's why eggdrop, unlike mIRC, has its internal client structure lists populated just after the join (more precisely, on receiving End Of /WHO list numeric) - becaise it does /who #channel on join
totally irrelevant
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Re: /who #chan when the bot joins

Post by demond »

Kurupt wrote:I have a problem. My bots need to join a big channel, big means 900+ ppl on chan. And wen the bot join he do a /who #chan and that make im to get ping timeout. So my question does somebody know how to stop to do /who #chan when he joins or have somebody a patch for something like that.
in src/mod/irc.mod/chan.c find this in gotjoin():

Code: Select all

        if (match_my_nick(nick)) {
          /* It was me joining! Need to update the channel record with the
           * unique name for the channel (as the server see's it). <cybah>
           */
          strncpy(chan->name, chname, 81);
          chan->name[80] = 0;
          chan->status &= ~CHAN_JUPED;

          /* ... and log us joining. Using chan->dname for the channel is
           * important in this case. As the config file will never contain
           * logs with the unique name.
           */
          if (chname[0] == '!')
            putlog(LOG_JOIN | LOG_MISC, chan->dname, "%s joined %s (%s)",
                   nick, chan->dname, chname);
          else
            putlog(LOG_JOIN | LOG_MISC, chan->dname, "%s joined %s.", nick,
                   chname);
          reset_chan_info(chan);
        } else {
and remove reset_chan_info(chan);

alternatively, you can edit src/mod/irc.mod/irc.c and remove

Code: Select all

dprintf(DP_MODE, "WHO %s\n", chan->name);
from reset_chan_info(), but that would mess other things up
User avatar
KrzychuG
Master
Posts: 306
Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:

Post by KrzychuG »

If you remove 'WHO' code from Eggdrop bot won't know which users are on channel. Bot won't also know their hostnames and won't react on bans, won't op them and so on.
Que?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

KrzychuG wrote:If you remove 'WHO' code from Eggdrop bot won't know which users are on channel. Bot won't also know their hostnames and won't react on bans, won't op them and so on.
depends ;)

if you remove just reset_chan_info() from that specific gotjoin() branch, it will behave exactly like mIRC - not synching its internal client structures on JOIN - but you can always enforce such synching by calling [resetchan] from a script

if you remove that WHO from reset_chan_info(), it will lose the ability to sync - though you might still be able to enforce sync by issuing raw WHO #chan; that's why I said that would screw other things

it's your choice ;) or rather his/her choice (hmm anyone knows a girl running eggdrop?)
User avatar
KrzychuG
Master
Posts: 306
Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:

Post by KrzychuG »

Yes, you're right, but in both methods you're loosing important (at least for me) features, like for example working enforcebans.
it's your choice or rather his/her choice (hmm anyone knows a girl running eggdrop?)
I knew one, she used one of Eggdrop's modification but she probably started with vanilla version too :)
Que?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Heres my simple version of +enforcebans, anyone can feel free to use it, ofcourse it's not in the best of shape. :P

Code: Select all

####### FILTER KICK ########
bind mode - "*+b*" filter:kick

proc filter:kick {nick uhost chan mode target} {
 global botnick botname
 if {([string equal "*!*@*" $target]) || ([string equal "*!~*@*" $target]) || ([string match "*\?*!*@*" $target]) || ([string match "*!*\?*@*" $target]) || ([lindex [split $target "@"] 1] < 5)} { return 0 }
 if {([string match "*+b*" $mode]) && (![string equal "ChanServ" $nick]) && (![string match -nocase *$target* $botname])} {
 foreach user [chanlist $chan] {
  if {([string match -nocase *$target* "${user}![getchanhost $user $chan]"]) && (![isop $user $chan]) && (![isvoice $user $chan]) && ([onchan $user $chan])} {
   putquick "KICK $chan $user :T3: You are terminated - Copyright © 2004 awyeah Inc. All rights reserved." -next
   }
  }; return 0
 }
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Kurupt
Voice
Posts: 26
Joined: Sun Aug 22, 2004 7:57 pm
Location: Hermanstat

neah

Post by Kurupt »

i don't use enforcebans so if no other problem is then will work fine for me. thanks
S
SiNLeSs
Voice
Posts: 3
Joined: Sat May 14, 2005 12:42 am

Post by SiNLeSs »

I edited this out, and I still get Max SendQ exceeded...
Locked