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 

wont let me set maxbans on dalnet

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


Joined: 22 Mar 2015
Posts: 941

PostPosted: Mon Jan 03, 2022 9:12 pm    Post subject: wont let me set maxbans on dalnet Reply with quote

im testing this badnick tcl on dalnet and it seems the message to channel outputs as expected using max allowed modes per line wich on dalnet is 6
yet the ban part sets all kinds of channel modes except the bans and i cant figure why


Code:

bind pub -|o !n pub:badnickbanX7000

proc pub:badnickbanX7000 {nick host hand chan text} {
 
      global botnick

                set reason [join [lrange [split $text "."] 1 end] "."]
           set text  [lindex [split $text "."] 0]
           if {$reason eq ""} { set reason "PLease Change Your NickName By Using \------> /NICK New-NICK And Rejoin By Using \------> /JOIN $chan ...... thank you." }

      foreach user $text {

         if {![onchan $user $chan]} {
            lappend umasks *$user*!*@*
         } else {
                 lappend umasks *$user*!*@*
         }
   }
       if {[info exists umasks]} {  stackBans3zXX $chan $umasks }
}

 

proc stackBans3zXX {chan banlist {max 6}} {
      set count [llength $banlist]
      while {$count > 0} {
         if {$count> $max} {
            set modex [string repeat "b" $max]
            set masks [join [lrange $banlist 0 [expr {$max - 1}]]]
            set banlist [lrange $banlist $max end]
            incr count -$max
            incr total $max
         } else {
            set modex [string repeat "b" $count]
            set masks [join $banlist]
            incr total $count
            set count 0
         }
         putnow "privmsg $chan :+$modex $masks"
         putnow "MODE $chan :+$modex $masks"
      }
   }



Quote:

02:06:23 <@Cappuccino> !n Archer Barkley Behlke Bower Calan Cerell Donella Geldens Langdon Lion Meagan Naoma Ophelie Paine Petuu Piwowar Plossl Salmon Wachtel Wang
02:06:23 -HawkONE- : +bbbbbb *Archer*!*@* *Barkley*!*@* *Behlke*!*@* *Bower*!*@* *Calan*!*@* *Cerell*!*@* (DALnet)
02:06:23 @HawkONE Sets Mode on #Questions-ReLay to: +cn
02:06:23 -HawkONE- : +bbbbbb *Donella*!*@* *Geldens*!*@* *Langdon*!*@* *Lion*!*@* *Meagan*!*@* *Naoma*!*@* (DALnet)
02:06:23 @HawkONE Sets Mode on #Questions-ReLay to: +nsiMm
02:06:23 -HawkONE- : +bbbbbb *Ophelie*!*@* *Paine*!*@* *Petuu*!*@* *Piwowar*!*@* *Plossl*!*@* *Salmon*!*@* (DALnet)
02:06:24 @HawkONE Sets Mode on #Questions-ReLay to: +piPntsSm
02:06:26 -HawkONE- : +bb *Wachtel*!*@* *Wang*!*@* (DALnet)
02:06:28 @HawkONE Sets Mode on #Questions-ReLay to: +ctn
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Thu Jan 06, 2022 12:47 am    Post subject: Reply with quote

why the extra : in the mode command¿
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Thu Jan 06, 2022 10:43 am    Post subject: Reply with quote

SpiKe^^ wrote:
why the extra : in the mode command¿




i dont see the extra : tho
Quote:
putnow "MODE $chan :+$modex $masks"
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Thu Jan 06, 2022 11:33 am    Post subject: Reply with quote

Duh.
Copy your examples exactly, neatness counts...
Code:
putnow "MODE $chan +$modex $masks"

_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Thu Jan 06, 2022 11:53 am    Post subject: Reply with quote

im not sure i understand what you mean spike^^ ?
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Thu Jan 06, 2022 11:54 am    Post subject: Reply with quote

I will assume you have the script working now?
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Thu Jan 06, 2022 12:32 pm    Post subject: Reply with quote

no it doesnt seem to work proper it sets all kinds of channel modes and not the bans its suppose too
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu Jan 06, 2022 12:40 pm    Post subject: Reply with quote

In your code you have:
Code:

putnow "MODE $chan :+$modex $masks"

do you notice the : in front of the $modex? It shouldn't be there. Our guess is that it might be the cause of the issues you are experiencing.

Btw, why not stick with pushmode and why bother changing the function name and variables from original code? Asking for my pure curiosity. Smile
_________________
Once the game is over, the king and the pawn go back in the same box.


Last edited by caesar on Thu Jan 06, 2022 12:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Thu Jan 06, 2022 12:40 pm    Post subject: Reply with quote

Please do as I said twice and remove the : from your mode line, or replace yours with the one I offered.

I don't know what else to tell you:)
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Thu Jan 06, 2022 1:17 pm    Post subject: Reply with quote

sorry my bad had a moment there

that seems to have fixed it

thanks Gents SpiKe^^ Caesar
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