TCLDROP
Would you like to react to this message? Create an account in a few clicks or log in to continue.
TCLDROP

Eggdrop And TCL Help, Support And Chat
 
HomeHome  PublicationsPublications  FAQFAQ  SearchSearch  MemberlistMemberlist  Latest imagesLatest images  UsergroupsUsergroups  RegisterRegister  Log in  CalendarCalendar  WebsiteWebsite  ChatRoomChatRoom  

 

 PubCMD

Go down 
3 posters
Go to page : Previous  1, 2, 3
AuthorMessage
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty11/9/2020, 14:48

Hmm, perhaps setting the trigger via variable would be enough, i guess if a user wants to chage the trigger properly, they would have to change via script tongue
Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty11/9/2020, 15:17

If you just change it by variable, it will be the same the old binds will still be active.
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty11/9/2020, 21:30

You mean, after restart? the old variable will be used right?
Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty15/9/2020, 14:23

ComputerTech wrote:
You mean, after restart? the old variable will be used right?
If you change the trigger in the script file, you have to restart the egg, the old binds are still active.

Below is an example to allow changing triggers with a file:

Code:

set pubcmdfile "scripts/trigger.txt"
set pubcmd ""

if {![file exists $pubcmdfile]} {
   putlog "\002FILE TRIGGER :\002 First start of the PUBCMD script, creating the trigger.txt file. The trigger is by default \" \002!\002 \". To change it on channel: !trigger + choice."
   set filePUBCMD [open $pubcmdfile w]
   puts $filePUBCMD "!"
   close $filePUBCMD
} else {
   set filePUBCMD [open $pubcmdfile r]
   set trigger [gets $filePUBCMD]
   close $filePUBCMD
   set pubcmd $trigger
}

proc do_trigger { nick uhost hand chan text } {
   global pubcmdfile pubcmd
   set trigger [lindex [split $text] 0 ]
   if {[string equal -nocase $trigger $::pubcmd]} {
      putserv "privmsg $chan :The trigger is already \"$::pubcmd\""
      return 0
   } else {
      if {$trigger !=""} {
         set filePUBCMD [open $pubcmdfile w]
         puts $filePUBCMD $trigger
         close $filePUBCMD
         unset pubcmd
         catch {unbind *}
         putserv "privmsg $chan :The trigger is \"$trigger\" now."
         putserv "privmsg $chan :I need to restart ... I will come back :)"
         restart         
      } else {
         putserv "privmsg $chan :ERROR SYNTAXE: ${pubcmd}trigger trigger(?+!-.)."
      }
   }
}
Back to top Go down
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty15/9/2020, 14:24

With the bind:

Code:

bind pub ${topflag} ${pubcmd}trigger do_trigger
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty14/10/2020, 13:34

Hmm, invite doesnt seem to work, perhaps uncorrect syntax? Neutral
Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty21/10/2020, 19:32

Are you sure that your eggdrop is op ?
the command works very well for me
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty12/11/2020, 05:14

ok, now it works, although another question.

Does !mode work if i set like this?

!mode -m+Rk secretpass

Or

!mode +o nick

?
Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty13/11/2020, 12:49

For the mode code (with the participation of CrazyCat):

Code:

proc do_mode {nick uhost hand chan text} {
    if {![botisop $chan]} {
        putserv "privmsg $chan :Désolé mais je ne suis pas @ sur $chan"
    } else {
        set a2modes [join [lindex [split $text] 0]]
        if {[string first - $a2modes] >=0} {
            set chanmodes [getchanmode $chan]
            set modes [join [lindex [split $chanmodes] 0]]
            if {[string first k $modes]>0} {
                putserv "MODE $chan $text [join [lindex [split $chanmodes] 1]]"
            } else {
                putserv "MODE $chan $text"
            }
        } else {
            putserv "MODE $chan $text"
        }
    }
}
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty14/11/2020, 19:56

That code work's great BdS Cool
Great Job Very Happy

the multiple nick ban script didn't work however.

you know like !kick nick1 nick2 nick3

i'll try it again, but perhaps you can take a look at it again Surprised
Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty14/11/2020, 22:50

Ban or kick ?
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty15/11/2020, 00:26

The kick and ban one

Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty15/11/2020, 09:03

Put the code please
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty15/11/2020, 09:09

http://paste.tclhelp.net/?id=6lg6

Perhaps i twstee it wrong, i will test it again, after work Cool
Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty15/11/2020, 19:48

Test result ?
Back to top Go down
Sponsored content





PubCMD - Page 3 Empty
PostSubject: Re: PubCMD   PubCMD - Page 3 Empty

Back to top Go down
 
PubCMD
Back to top 
Page 3 of 3Go to page : Previous  1, 2, 3

Permissions in this forum:You cannot reply to topics in this forum
TCLDROP :: TCL :: Script Support & Releases-
Jump to: