Formatting of code : You can (and must) use [ tcl ] an [ /tcl ] tags (without spaces in tags) to format your TCL codes and have syntax coloration x


public/pm management of CAP's (rcv3 module) monitor + notifications
#1
Hi everyone!
I would like to request a script that would allow public triggers (as well as pm(s)) for managing 'monitor' commands and return info as choosable options (msg/notice).
As an additional feature I would like to be able to set and manage wether bot should inform via msg/notice (choosable too) of one/multiple nicknames that being monitored.

On the partyline its ".tcl monitor <add/delete/list/clear/online/offline/status>"

Examples of requested: 
for public/pm "!monitor add <nickname>" ; "/msg botnick monitor add <nickname>"
for the notifications "!monitor on/off <nickname> ; /msg monitor on/off <nickname>"

so bot would notify (via msg/notice) whenever <nickname> status changes: "<nickname> went offline/online" or something like that.

Thats the basic idea I got, but Im open for any suggestions on how to organise this better.

Thanks!
  Reply
#2
Well, short question : who will be authorized to use the script ? anyone, some users ?
And do you want the kind of notify (msg or notice) being setted globaly or per user (user preference) ?

I'm not sure the online/offline commands are usefull, as status does the same (status returns 1 if online, 0 if offline). And public commands are, imho, bad idea. Do you really want that anyone knows you decide to follow someone ?
zeolia: tchat gratuit, sans inscription ni publicité
Merci de ne pas demander d'aide en MP
Away
  Reply
#3
(07/02/2023, 13:51)CrazyCat Wrote: Well, short question :  who will be authorized to use the script ? anyone, some users ?
And do you want the kind of notify (msg or notice) being setted globaly or per user (user preference) ?

I'm not sure the online/offline commands are usefull, as status does the same (status returns 1 if online, 0 if offline). And public commands are, imho, bad idea. Do you really want that anyone knows you decide to follow someone ?

Regarding permissions: I think I would restrict that to just the owner(s).

Regarding notifications: Ideally I would like it to have choices of destinations (bot's user and/or #channel), but not sure how much complexity it adds for the scripting.

You are right about the online/offline. Could leave those out.

For pub commands you could always use the partyline ; /msg botnick if you don't want to disclose your spy intentions :)
  Reply
#4
Little POC quickly made: https://gitlab.com/tcl-scripts/welcome/-...onitor.tcl


Code:
15:07:56 <CrazyCat> !notify add zartek
15:07:57 <CC_Egg> zartek
15:07:58 <CC_Egg> ZarTek is now online
15:08:09 <CrazyCat> !notify status zartek
15:08:10 <CC_Egg> CrazyCat is online
15:14:09 <CrazyCat> !notify add zartek
15:14:39 <CrazyCat> !notify add lambda
15:14:41 <CC_Egg> lambda zartek
15:14:42 <CC_Egg> lambda is now offline
15:16:06 <CC_Egg> lambda is now online
mono-user as I don't save any information about who wants to follow who and the monitor list is global (the server only saw 1 user, the eggdrop).
The errors are actually not catched, and the message when a user goes offline/online is sent to $:owner (setted in eggdrop.conf).

But, it's a POC, I'll make a better script soon.
zeolia: tchat gratuit, sans inscription ni publicité
Merci de ne pas demander d'aide en MP
Away
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)