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.

putdccraw question

Old posts that have not been replied to for several years.
Locked
D
DayCuts
Voice
Posts: 37
Joined: Tue Jun 15, 2004 8:43 am

putdccraw question

Post by DayCuts »

Ok, ive browsed through the forums for a way to 'bypass' the msgq's built into eggdrop and everything points to using putdccraw. However when i use a simple while loop and code such as (for example) below it does not seem to bypass these msgq's like it should.

Code: Select all

set i 0
while {10 > $i} {
  set out "PRIVMSG $nick :test $i\n" 
  putdccraw 0 [string length $out] $out
  incr i
}
Theoredically, and according to what i have read on the forums, this should send all 10 lines of text to $nick without delay, but what i am seing is the first 4 lines being sent and the rest sent on delay (exactly as putquick would)

I do not need to worry about being flooded off, as the script is intended to be run on a network admin bot for an ircd. (opered users on the ircd are not affected by such flood limits)

Am i doing something wrong? am i missing something?
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Elen sila lúmenn' omentielvo
D
DayCuts
Voice
Posts: 37
Joined: Tue Jun 15, 2004 8:43 am

Post by DayCuts »

Well, i guess im still missing something, because i have read that thread before, and asked basically the same question in there... However the use of putdccraw still fails to improve anything when sending several lines of text to a channel or user. And my question was never really answered there also. Maybe i am misunderstanding the concept/use of putdccraw? I don't know, if somebody could explain why i am not experiencing any improvements with this whilst others are it would be very helpful. Or suggest another method of sending several lines of text without delay? (i read about editing the server mod and recompiling, however this is something i would prefer to aviod)
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Try using, putquick with -next, atleast the messages will be stacked and
sent correctly. Using raw sometimes causes problems as well. :wink:

Putdccraw has almost the same time interval to reach the server as putquick. Sometimes... infact most of the time my putdccraw outputs are slower than putquick -next. :roll:

So use putquick -next, because putdccraw isn't very fast than putquick, they are almost the same as far as speed goes... If there is a difference maybe in mirco/nano seconds which is almost negligble. :wink:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

DayCuts wrote:i read about editing the server mod and recompiling, however this is something i would prefer to aviod
That's the only way to get rid of the 2 sec delay/512 bytes.
Edit server.c (about line 123): #define msgrate 2
Have you ever read "The Manual"?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

user one more thing if I may add.
I am trying to change the channel join interval of the bot. :wink:

[1] Suppose, if the bot is banned and kick from a channel, then unbanned the bot takes sometime 10-20 secs to rejoin the back, sometimes less sometimes more, depending upon a continuous timer. Now in which file can I edit this. I can't seem to find it. :D

[2] I also want to edit the delay timers of need-op, need-unban, need-invite, need-limit and need-key and make them faster. :P

If you have any idea regarding this let me know.
I asked the eggheads development team, they gave me a reply which was weird, and I was unable to do what they had implemented me to do so. :mrgreen:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

awyeah wrote:user one more thing if I may add.
I am trying to change the channel join interval of the bot. :wink:

[1] Suppose, if the bot is banned and kick from a channel, then unbanned the bot takes sometime 10-20 secs to rejoin the back, sometimes less sometimes more, depending upon a continuous timer. Now in which file can I edit this. I can't seem to find it. :D

[2] I also want to edit the delay timers of need-op, need-unban, need-invite, need-limit and need-key and make them faster. :P

If you have any idea regarding this let me know.
I asked the eggheads development team, they gave me a reply which was weird, and I was unable to do what they had implemented me to do so. :mrgreen:
They're all the same (except for need-op), triggered by the bot trying to rejoin the channel. Are you sure you want to speed up this JOIN-hammering? I'm not sure where the interval is specified. What did the eggheads say?
Have you ever read "The Manual"?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Here is the reply to my thread posted by BarkerJr.
BarkerJr barkerjr at barkerjr.net
Mon Apr 26 11:35:52 CDT 2004

Previous message: Eggheads: How to edit the internal channel rejoin timer on aneggdrop?
Next message: Eggheads: About logging in Eggdrop
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

--------------------------------------------------------------------------------

> I think it is a numerical value and wouldn't take to much to do so.

Unfortunately, it isn't. It's in a function that is called every 60 seconds.


> I'm not sure which files this relates too but its in one of the
> ".c" files chan.c probobaly, then again I'm not sure.

src/mod/irc.mod/irc.c
Starting on line 677 in 1.6.16rc1.

} else if (!channel_inactive(chan) && !channel_pending(chan))
dprintf(DP_MODE, "JOIN %s %s\n",
(chan->name[0]) ? chan->name : chan->dname,
chan->channel.key[0] ? chan->channel.key : chan->key_prot);


Myself, I'd probably just declare a static char as a counter in that if
statement. For example, if you want it every 7 minutes.

} else if (!channel_inactive(chan) && !channel_pending(chan)) {
static unsigned char ctr;
if (ctr >= 7)
{
dprintf(DP_MODE, "JOIN %s %s\n",
(chan->name[0]) ? chan->name : chan->dname,
chan->channel.key[0] ? chan->channel.key : chan->key_prot);
ctr = 0;
}
else ctr++;
}


On second thought, the code is flawed. With this code, it'll only rejoin every seventh channel in the bot. But, anyways, you get the idea :)
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

You can't change the interval by changing a single value (well, you can make it do it every second instead of every minute, but that's too fast, and you'd mess up alot of other stuff), so I guess making a tcl would be easier...or find someone that knows a bit of C :)

If this was slashdot, you'd be modded -1 offtopic :)
Have you ever read "The Manual"?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Hmmm, I was expecting maybe u'd know C user. :wink:
Anyway nevermind... I think I'll let it pass, I guess.

Yes maybe I can develop a tcl for this, using chanserv unban #chan $botnick and then a utimer to rejoin, nothing more than that. :mrgreen:

Thanks anyway!
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked