View previous topic :: View next topic |
Author |
Message |
simo Master
Joined: 22 Mar 2015 Posts: 330
|
Posted: Thu Feb 28, 2019 11:10 am Post subject: set channel mode with no prefixed public command |
|
|
anyway to change this to have it set modes in the manner of for example:
+m
+vvvvvv nick nick nick nick nick
+l 120
+k secretkey
+M
+i
-i
+i
+b *!*@host
and so on, with the criteria of first char should be a + or - to determine its a mode setting
Code: |
bind pubm o|o * chan:modes
proc chan:modes { user host ident chan arg } {
set mode [lindex [split $arg] 0]
putserv "MODE $chan :$mode"
}
|
because as the code is it sets modes even if regular words are written
like im ok tnx and how about u ( it will set +im and so on while there was no + - used )
Last edited by simo on Thu Feb 28, 2019 4:29 pm; edited 1 time in total |
|
Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1046
|
|
Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 607 Location: Tennessee, USA
|
Posted: Thu Feb 28, 2019 2:14 pm Post subject: bind mode request. |
|
|
Try replacing this one line... Code: | bind pubm o|o * chan:modes |
with these 2 lines... Code: | bind pubm o|o "#% +?*" chan:modes
bind pubm o|o "#% -?*" chan:modes |
and restart the bot, to unload the old bind and add these 2. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Last edited by SpiKe^^ on Thu Feb 28, 2019 7:22 pm; edited 1 time in total |
|
Back to top |
|
 |
simo Master
Joined: 22 Mar 2015 Posts: 330
|
Posted: Thu Feb 28, 2019 4:10 pm Post subject: |
|
|
hm ok tried your suggestion SpiKe^^ and it didnt do anything and no errors |
|
Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 607 Location: Tennessee, USA
|
Posted: Thu Feb 28, 2019 7:22 pm Post subject: |
|
|
Updated the above code. Try again. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
Back to top |
|
 |
simo Master
Joined: 22 Mar 2015 Posts: 330
|
Posted: Fri Mar 01, 2019 9:38 am Post subject: |
|
|
tried it and seems to work well thnx SpiKe^^ apreciated as always |
|
Back to top |
|
 |
simo Master
Joined: 22 Mar 2015 Posts: 330
|
Posted: Thu Mar 21, 2019 7:55 am Post subject: |
|
|
i had just one small detail , in the case of mentioning a voiced nick in the first parameter might result in a false positive for example:
if a chanop or me would type
+mike are u around buddy
and mike would be in channel and voiced that would trigger this tcl and set channelmodes +mi in channel wich is an unwanted effect perhaps its an idea to check if there is a nick in first parameter that is in channel present to then ignore the function of setting mode if that to be the case |
|
Back to top |
|
 |
|