2.0/Modules/os news

From AnopeWiki
Jump to: navigation, search
Language

English

Service OperServ
Module os_news
Author Anope

Description

LOGONNEWS 
Edits or displays the list of logon news messages. When a user connects to the network, these messages will be sent to them. However, no more than 3 messages will be sent in order to avoid flooding the user. If there are more news messages, only the most recent will be sent.
OPERNEWS 
Edits or displays the list of oper news messages. When a user opers up (with the /OPER command), these messages will be sent to them. However, no more than 3 messages will be sent in order to avoid flooding the user. If there are more news messages, only the most recent will be sent.
RANDOMNEWS 
Edits or displays the list of random news messages. When a user connects to the network, one (and only one) of the random news will be randomly chosen and sent to them.
  • NOTE: Access to these commands require the permission operserv/news to be present in your opertype.

Commands

logonnews ADD text
logonnews DEL {num | ALL}
logonnews LIST
opernews ADD text
opernews DEL {num | ALL}
opernews LIST
randomnews ADD text
randomnews DEL {num | ALL}
randomnews LIST

Examples

/msg OperServ LOGONNEWS ADD We have upgraded services. Your previous registrations have been preserved. Please note that chanserv has changed a lot, you should check it out.

/msg OperServ OPERNEWS DEL 3

/msg OperServ RANDOMNEWS LIST

Default Configuration

/*
 * os_news
 *
 * Provides the commands operserv/logonnews, operserv/opernews, and operserv/randomnews.
 *
 * Used to configure news notices shown to users when they connect, and opers when they oper.
 */
module
{
        name = "os_news"
 
        /*
         * The service bot names to use to send news to users on connection
         * and to opers when they oper.
         */
        announcer = "Global"
        oper_announcer = "OperServ"
 
        /*
         * The number of LOGON/OPER news items to display when a user logs on.
         *
         * This directive is optional, if not set it will default to 3.
         */
        #newscount = 3
}
command { service = "OperServ"; name = "LOGONNEWS"; command = "operserv/logonnews"; permission = "operserv/news"; }
command { service = "OperServ"; name = "OPERNEWS"; command = "operserv/opernews"; permission = "operserv/news"; }
command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomnews"; permission = "operserv/news"; }