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 

+v-v $nick $nick in one line

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


Joined: 14 Aug 2009
Posts: 55

PostPosted: Fri Aug 13, 2010 9:14 pm    Post subject: +v-v $nick $nick in one line Reply with quote

Hello can i use pushmode $chan +v-v $nick $nick in one line ?
Back to top
View user's profile Send private message
Luminous
Op


Joined: 12 Feb 2010
Posts: 146

PostPosted: Fri Aug 13, 2010 10:01 pm    Post subject: Reply with quote

Not exactly... pushmode is intended to lump several mode commands into a single line. Not sure why you would want to cancel out a mode like that, but this would probably work:

Code:
pushmode $chan +v $nick
pushmode $chan -v $nick
Back to top
View user's profile Send private message
neoclust
Halfop


Joined: 14 Aug 2009
Posts: 55

PostPosted: Sat Aug 14, 2010 6:21 am    Post subject: Reply with quote

I tried that but it does not work :
utimer 10 [list pushmode $chan +v $nick]
utimer 1 [list pushmode $chan -v $nick]

the result :
[11:20] *** Eggy sets mode: +v neoclust
Back to top
View user's profile Send private message
Luminous
Op


Joined: 12 Feb 2010
Posts: 146

PostPosted: Sat Aug 14, 2010 9:49 am    Post subject: Reply with quote

Back to back timers causes issues for me.. try something like this instead, even though its ugly:

Code:

... code....
 utimer 10 [list cancel_mode $nick $chan]
... rest of code....
}
proc cancel_mode {nick chan} {
 pushmode $chan +v $nick
 pushmode $chan -v $nick
}


If that doesn't do it... I don't know.. :\
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sat Aug 14, 2010 10:25 am    Post subject: Re: +v-v $nick $nick in one line Reply with quote

neoclust wrote:
Hello can i use pushmode $chan +v-v $nick $nick in one line ?


If you want to get it on one line, try:
Code:

putserv "mode #chan -v+v $firstnick $secondnick"


but, did you mean to use the same nick twice? Nothing will happen if you use the same nick twice. ... maybe I'm not understanding the goal.
Back to top
View user's profile Send private message
Luminous
Op


Joined: 12 Feb 2010
Posts: 146

PostPosted: Sat Aug 14, 2010 10:44 am    Post subject: Reply with quote

Yeah, puserv/quick/help would work just fine with that. I did a mode +b-b *!*@* *!*@* in one line in my egg a minute ago and it worked fine, aside from freaking out another bot that was on the channel, haha.
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sat Aug 14, 2010 11:35 am    Post subject: Reply with quote

The problem is pushmode will stack modes and wait for either the end of the invoked procedure, or flushmode before it actually sends them to the server. Modes enabling/negating the same thing get stripped naturally. To get around this, you can flushmode after the pushmode.
Code:
pushmode $chan +v $nick
flushmode $chan
pushmode $chan -v $nick
flushmode $chan

_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
neoclust
Halfop


Joined: 14 Aug 2009
Posts: 55

PostPosted: Sat Aug 14, 2010 5:43 pm    Post subject: Reply with quote

Hello i'm using

Code:

utimer 10 [list cancel_mode $nick $chan]

proc cancel_mode {nick chan} {
        pushmode $chan +v $nick
        putlog "up"
        flushmode $chan
        pushmode $chan -v $nick
        putlog "down"
        flushmode $chan
}

I received the message putlog but remains devoice which was not the case

Quote:
[22:37] ((nino): [21:37] Userfile loaded, unpacking...
[22:37] ((nino): [21:37] up
[22:37] ((nino): [21:37] down
[22:37] ((nino): [21:37] #test: mode change '+v fg' by nino !blah@blah.com
[22:40] ((nino): [21:40] @#test (+smtDn) : [m/3 o/1 h/0 v/2 n/0 b/0 e/- I/-]

In channel :
Quote:
[22:37] *** [#test] users- 1 op(s) 33.33% - 1 voice(s) 33.33% - 1 other(s) 33.33%
[22:37] *** ········································
[22:37] *** nino sets mode: +v fg
Back to top
View user's profile Send private message
neoclust
Halfop


Joined: 14 Aug 2009
Posts: 55

PostPosted: Sat Aug 14, 2010 6:13 pm    Post subject: Reply with quote

The objective of this script is to publish the users who are in hidden mode in the presence of mode +Dm of the canal and keep only those identified in X and that *.users.undernet.org in their Host I hope you understand me
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