| PubCMD | |
|
|
|
Author | Message |
---|
ComputerTech Owner
Posts : 99 Points : 268 Reputation : 0 Join date : 2020-04-30
| Subject: Re: PubCMD 11/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 | |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: PubCMD 11/9/2020, 15:17 | |
| If you just change it by variable, it will be the same the old binds will still be active. | |
|
| |
ComputerTech Owner
Posts : 99 Points : 268 Reputation : 0 Join date : 2020-04-30
| Subject: Re: PubCMD 11/9/2020, 21:30 | |
| You mean, after restart? the old variable will be used right? | |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: PubCMD 15/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(?+!-.)." } } }
| |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: PubCMD 15/9/2020, 14:24 | |
| With the bind: - Code:
-
bind pub ${topflag} ${pubcmd}trigger do_trigger
| |
|
| |
ComputerTech Owner
Posts : 99 Points : 268 Reputation : 0 Join date : 2020-04-30
| Subject: Re: PubCMD 14/10/2020, 13:34 | |
| Hmm, invite doesnt seem to work, perhaps uncorrect syntax? | |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: PubCMD 21/10/2020, 19:32 | |
| Are you sure that your eggdrop is op ? the command works very well for me | |
|
| |
ComputerTech Owner
Posts : 99 Points : 268 Reputation : 0 Join date : 2020-04-30
| Subject: Re: PubCMD 12/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
? | |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: PubCMD 13/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" } } }
| |
|
| |
ComputerTech Owner
Posts : 99 Points : 268 Reputation : 0 Join date : 2020-04-30
| Subject: Re: PubCMD 14/11/2020, 19:56 | |
| That code work's great BdS Great Job 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 | |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: PubCMD 14/11/2020, 22:50 | |
| | |
|
| |
ComputerTech Owner
Posts : 99 Points : 268 Reputation : 0 Join date : 2020-04-30
| Subject: Re: PubCMD 15/11/2020, 00:26 | |
| | |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: PubCMD 15/11/2020, 09:03 | |
| | |
|
| |
ComputerTech Owner
Posts : 99 Points : 268 Reputation : 0 Join date : 2020-04-30
| Subject: Re: PubCMD 15/11/2020, 09:09 | |
| | |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: PubCMD 15/11/2020, 19:48 | |
| | |
|
| |
Sponsored content
| Subject: Re: PubCMD | |
| |
|
| |
| PubCMD | |
|