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.

Putquick VS pushmode. REALLY A PROBLEM

Old posts that have not been replied to for several years.
Locked
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Putquick VS pushmode. REALLY A PROBLEM

Post by CoMMy »

Hey guys, I really some assistance on this! :P

I have a pushmode command in a proc which works fine.

Code: Select all

pushmode $chn -o $user
The pushmode results are:

Code: Select all

(15:26) * EggDrop sets mode: -oooooo user user user user user user
(15:26) * EggDrop sets mode: -oooooo user user user user user user
(15:26) * EggDrop sets mode: -oooooo user user user user user user
But pushmode is slow and i want the command to be carried out fast. So i tried
the following.

Code: Select all

putquick "MODE $chn -o $user" -next
This also works but with these as results:

Code: Select all

(15:30) * EggDrop sets mode: -o user 
(15:30) * EggDrop sets mode: -o user 
(15:30) * EggDrop sets mode: -o user 
(15:30) * EggDrop sets mode: -o user 
(15:30) * EggDrop sets mode: -o user 
Is there a way to use putquick and make the bot perform the command
like in the pushmode results?
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

According to tcl-commands.doc file about "pushmode"..
All the mode changes will
be sent out at once (combined into one line as much as possible) after
the script finishes, or when 'flushmode' is called.
and about the "putquick"
sends text to the server, like 'putserv', but it uses a
different (and faster) queue.
so.. if you want to make it do stuff faster either figure out by yourself how to do that "(combined into one line as much as possible)" thing like in pushmode or use the normal and "slow way" of "pushmode"
Once the game is over, the king and the pawn go back in the same box.
c
cerberus_gr
Halfop
Posts: 97
Joined: Fri Feb 07, 2003 8:57 am
Location: 127.0.0.1

Post by cerberus_gr »

What about this:
putquick "MODE $chn -oooooo $user $user $user $user $user $user" -next
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

putquick "MODE $chn -oooooo $user $user $user $user $user $user" -next

Code: Select all

putquick "MODE $chn :-oooooo $user $user $user $user $user $user" -next 
if i remember well it requires ":" cause its raw data

Code: Select all

foreach {a b c d e f} $user {
  putquick "MODE $chan :-oooooo $a $b $c $d $e $f" 
}
you can't use $user cause its always the same var unless $user is the list, but if the list exseeds the number of modes only the number of modes will be deopped and not the entire list foreach will solve this for you like this u can make the list unlimited long, but u can only use as mutch modes as ur ircd supports type /version in order to see how many modes the server supports
XplaiN but think of me as stupid
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Ofloo wrote:
putquick "MODE $chn -oooooo $user $user $user $user $user $user" -next

Code: Select all

putquick "MODE $chn :-oooooo $user $user $user $user $user $user" -next 
if i remember well it requires ":" cause its raw data

Code: Select all

foreach {a b c d e f} $user {
  putquick "MODE $chan :-oooooo $a $b $c $d $e $f" 
}
you can't use $user cause its always the same var unless $user is the list, but if the list exseeds the number of modes only the number of modes will be deopped and not the entire list foreach will solve this for you like this u can make the list unlimited long, but u can only use as mutch modes as ur ircd supports type /version in order to see how many modes the server supports
You remember incorrectly... channel modes (other than topic) do not require : , and will infact not work with it at all.

In any event, caesar's point about flushmode, commy, is probably the best solution to whatever you are trying to do.
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

I think i found a much faster way to mass mode a chan.
This is what i have and it is slow but it deops 6ppl every time.

Code: Select all

.......
foreach user [chanlist $chan] {
set hand [nick2hand $user $chan]
if {![isop $user $chan] || [matchattr $hand n] || [matchattr $hand N] || [matchattr $hand m] || $user == $botnick || [onchansplit $user $chan]} {continue} 
pushmode $chan -o $user }}
flushmode $chan
return 1 }
I modified it to this:

Code: Select all

foreach user [chanlist $chan] {
set hand [nick2hand $user $chan]
if {![isop $user $chan] || [matchattr $hand n] || [matchattr $hand N] || [matchattr $hand m] || $user == $botnick || [onchansplit $user $chan]} {continue} 
set what "MODE $chan -o-o-o-o-o-o $user $user $user $user $user $user \n"
putdccraw 0 [string length $what] $what }}
return 1 }
This is a lot faster BUT it deops one person per time.
Is there a way to seperate the "users" in seperate args?
for ex. "MODE $chan -o-o-o-o-o-o $user1 $user2 $user3 $user4 $user5 $user6 \n"

Of course what must be done is to write a code to see how much people will be deoped,
put each user in seperate arg [ex. $user1] and accordingly make the deop using putdccraw.
Is there a way to do this ? :o
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
Locked