Coder Social home page Coder Social logo

znc-push's Introduction

ZNC Push

FAQ | Example Configuration | Build Status

Overview

ZNC Push is a module for ZNC that will send notifications to multiple push notification services, or SMS for any private message or channel highlight that matches a configurable set of conditions. ZNC Push current supports the following services:

This project is still a Work In Progress, but should be functional enough and stable enough for everyday usage. Users are more than welcome to submit feature requests or patches for discussion or inclusion. Bug reports and feature requests can be submitted to the repository issues list, or sent via email.

For full functionality, this module requires ZNC version 0.090 or newer, but should compile and run with a reduced feature set on versions as old as 0.078, the current version used by Ubuntu. However, development and testing is done exclusively against the latest source distribution, so feedback on older releases of ZNC is needed to continue supporting them. If you want to use ZNC versions before 1.0 (0.206 or older), you will need to check out the "legacy" branch in order to compile it correctly.

ZNC Push was created by Amethyst Reese and designed to fill a personal need. It may not fit your use cases, but any and all feedback would be greatly appreciated.

Dependencies

If you have installed ZNC from a Linux distribution's repository, you will most likely need to install the development package before building this module. On Ubuntu, this can be installed with:

$ sudo aptitude install znc-dev

In order for this plugin to properly work, you will need to ensure you have the ca-certificates package on Ubuntu based systems. This is required for push to properly verify the certificate of the service it's sending your message to.

$ sudo aptitude install ca-certificates

Optionally, if you want to use libcurl for http requests, you also need to install cURL development header files.

On Ubuntu, development headers can be installed by installing libcurl3-dev or libcurl4-openssl-dev package:

$ sudo aptitude install libcurl4-openssl-dev

Compiling

If you have make installed, you can compile the module with:

$ make

Otherwise, run the full command:

$ znc-buildmod push.cpp

Advanced

If you would like to compile ZNC Push using libcurl for http requests, you must use:

$ make curl=yes

If libcurl is not in the default system library paths, you will need to populate $CXXFLAGS with the appropriate GCC flags so that it can find and link ZNC Push with libcurl.

Note: You are strongly encouraged to use libcurl transport. The reason for that is, that the default CSocket transport doesn't verify server's SSL certificate which leaves you vulnerable to MITM attacks. However, use of libcurl will block the main ZNC thread at every push notification; for installations with many users, libcurl is not yet ideal, even with the above security concerns in mind.

Installation

Copy the compiled module into your ZNC profile:

$ make install

Now, load the module in ZNC:

/msg *status loadmod --type=user push

Note: the below command will only enable ZNC Push for a single network in ZNC. Make sure you do not load it for both.

/msg *status loadmod push

If you prefer to use ZNC's "controlpanel" module, you may do so like this:

/msg *status loadmod controlpanel
/msg *controlpanel loadmod push

Then select the push service you want to use, and set your username and secret as needed. The secret is not your password, and can be obtained by logging into the service's website and looking in your profile or settings:

/msg *push set service pushover
/msg *push set username foo
/msg *push set secret ...

If you're using Boxcar, you need to use the following command to send a subscription request to your account, before ZNC Push can start working:

/msg *push subscribe

At this point, it should start sending notifications every time you get a private message or someone says your name in a channel. If this is everything you wanted, congratulations, you're done!

For further, detailed instructions specific to each push notification service, the following documentation is available:

Commands

  • help

    Links you to this fine document.

  • version

    Tells you the tagged build version currently running.

  • set <option> <value>

    Allows you to modify configuration values.

  • append <option> <value>

    Allows you to add a string to end of a configuration value. Automatically adds a space to separate the appended value from the existing value.

  • prepend <option> <value>

    Allows you to add a string to beginning of a configuration value. Automatically adds a space to separate the prepended value from the existing value.

  • get [<option>]

    Allows you to see current configuration values.

  • unset <option>

    Allows you to reset a configuration option back to the default value.

  • save <filename>

    Writes your options to a file with the given path and name.

  • load <filename>

    Loads your options from a file with the given path and name. Caution should be taken, as this will lose any options that aren't already saved to the given file.

  • status [<context>]

    Check the status of current conditions. Specifying the "context" of either a channel or nick name will provide status values specific to that context.

  • subscribe

    Send a subscription request for the selected service to your configured account. This is required by certain services, such as Boxcar, before ZNC Push can send any messages to your account.

  • send <message>

    Manually trigger a notification with the given message. Useful for testing to validate credentials, etc.

  • eval <expression>

    Evaluate the given expression in an empty context. Useful for testing to validate that a given expression is properly formatted and does not contain invalid tokens.

Configuration

Keyword Expansion

Some configuration options allow for optional keyword expansion, which happens while preparing to send the push notification. Expansion is performed each time a notification is sent. Expansion is only performed on options that explicitly state that keyword expansion can be performed.

The following keywords will be replaced with the appropriate value:

  • {context}: the channel or query window context
  • {nick}: the nick that sent the message
  • {network}: the network the message is coming from
  • {datetime}: ISO 8601 date string, in server-local time
  • {unixtime}: unix-style integer timestamp
  • {title}: the default title for the notification
  • {message}: the shortened message contents
  • {username}: the configured username string
  • {secret}: the configured secret string

As an example, a value of "http://domain/{context}/{datetime}" would be expanded to something similar to "http://domain/#channel/2011-03-09 14:25:09", or "http://domain/{nick}/{unixtime}" to "http://domain/somenick/1299685136".

Push Services

  • service Default:

    Short name for the push notification service that you want to use. Must be set before ZNC Push can send any notifications.

    Possible values include:

    • boxcar
    • pushover
    • pushsafer
    • prowl
    • supertoasty
    • pushbullet
    • nexmo
    • pushjet
    • telegram
    • slack
    • discord
    • igloo
    • url
  • username Default:

    User account that should receive push notifications.

    This option must be set when using Boxcar or Pushover. For Nexmo, this is the service/api key.

    When using the custom URL service, if this option is set it will enable HTTP basic authentication and be used as username.

  • secret Default:

    Authentication token for push notifications.

    This option must be set when using Notify My Android, Pushover, Pushsafer, Prowl, Supertoasty, PushBullet, Nexmo, Pushjet, or Telegram.

    When using the custom URL service, if this option is set it will enable HTTP basic authentication and be used as password.

  • target Default:

    Device or target name for push notifications.

    When using Pushover or PushBullet, this option allows you to specify a single device to send notifications to; if blank or unset, notifications will be sent to all devices. For Pushover, this is the device name; for PushBullet, this is the device_iden.

    When using Nexmo, this option allows you to specify the SMS destination number. The number must be in international format.

    When using Telegram, this is the id of the chat that receives the message.

    When using Pushsafer, this is the id or group id of your devices.

  • extra_target Default:

    Second device or target name for push notifications.

    Currently only Igloo supports this option. Can be used to send notifications to up to two devices at the same time.

Notifications

  • message_content Default: {message}

    Message content that will be sent for the push notification. Keyword expansion is performed on this value.

  • message_length Default: 100

    Maximum length of the notification message to be sent. The message will be nicely truncated and ellipsized at or before this length is reached. A value of 0 (zero) will disable this option.

  • message_title Default: {title}

    Title that will be provided for the push notification. Keyword expansion is performed on this value.

    When using Nexmo, this value is where the SMS is "from". In most cases, you must use a valid number in international format.

  • message_escape Default:

    If set, keyword values will be escaped in this format before they are expanded in message_content. Possible values are all that ZNC supports, most useful here will be HTML or URL.

    Note that the resulting string in message_content after keyword expansion will not be escaped. If you need to escape characters for a service, you have to set the escaped string to message_content.

  • message_uri Default:

    URI that will be sent with the push notification. This could be a web address or a local scheme to access a mobile application. Keyword expansion is performed on this value.

    When using the custom URL service, this options allows you to specify the URL to send a GET request to, and has keyword expansion performed on portions of it, including the path and any query parameter values.

  • message_uri_post Default: no

    When using the custom URL service, this option allows you to specify whether to use the POST method instead of GET.

  • message_uri_title Default:

    If you're using Pushover.net or Pushsafer.com, you can specify a title for the message_uri option.

  • message_priority Default:

    Priority level that will be used for the push notification. Currently supported only by Pushover.net, Notify My Android and Pushjet.

  • message_sound Default:

    Notification sound to play with the push notification. Supported under Pushover, Pushsafer, Faast, and Boxcar 2. Must be chosen from the list of Pushover sounds, Pushsafer sounds, Faast sounds or Boxcar 2 sounds.

Conditions

  • away_only Default: no

    If set to yes, notifications will only be sent if the user has set their /away status.

    This condition requires version 0.090 of ZNC to operate, and will be disabled when compiled against older versions.

  • client_count_less_than Default: 0

    Notifications will only be sent if the number of connected IRC clients is less than this value. A value of 0 (zero) will disable this condition.

  • highlight Default:

    Space-separated list of highlight strings to match against channel messages using case-insensitive, wildcard matching. Strings will be compared in order they appear in the configuration value, and the first string to match will end the search, meaning that earlier strings take priority over later values.

    Individual strings may be prefixed with:

    • - (hyphen) to negate the match, which makes the string act as a filter rather than a search

    • _ (underscore) to trigger a "whole-word" match, where it must be surrounded by whitespace to match the value

    • * (asterisk) to match highlight strings that start with any of the above prefixes

    As an example, a highlight value of -pinto car will trigger notification on the message "I like cars", but will prevent notifications for "My favorite car is the Pinto" and "I like pinto beans". Conversely, a highlight value of car -pinto will trigger notifications for the first two messages, and only prevent notification of the last one.

    As another example, a value of _car will trigger notification for the message "my car is awesome", but will not match the message "I like cars".

  • idle Default: 0

    Time in seconds since the last activity by the user on any channel or query window, including joins, parts, messages, and actions. Notifications will only be sent if the elapsed time is greater than this value. A value of 0 (zero) will disable this condition.

  • last_active Default: 180

    Time in seconds since the last message sent by the user on that channel or query window. Notifications will only be sent if the elapsed time is greater than this value. A value of 0 (zero) will disable this condition.

    Note that this condition keeps track of the last message sent to each channel and query window separately, so a recent PM to Joe will not affect a notification sent from channel #foo.

  • last_notification Default: 300

    Time in seconds since the last notification sent from that channel or query window. Notifications will only be sent if the elapsed time is greater than this value. A value of 0 (zero) will disable this condition.

    Note that this condition keeps track of the last notification sent from each channel and query window separately, so a recent PM from Joe will not affect a notification sent from channel #foo.

  • nick_blacklist Default:

    Space-separated list of nicks. Applies to both channel mentions and query windows. Notifications will only be sent for messages from nicks that are not present in this list, using a case-insensitive comparison.

    Note that wildcard patterns can be used to match multiple nicks with a single blacklist entry. For example, set nick_blacklist *bot will not send notifications from nicks like "channelbot", "FooBot", or "Robot". Care must be used to not accidentally blacklist legitimate nicks with wildcards.

  • network_blacklist Default:

    Space-separated list of network names. Notifications will only be sent for messages from networks that are not present in this list, using a case-insensitive comparison.

  • replied Default: yes

    If set to yes, notifications will only be sent if you have replied to the channel or query window more recently than the last time a notification was sent for that context.

  • context Default: *

    Similar to highlight, this is a space-separated list of strings to match against message contexts using case-insensitive, wildcard matching. Strings will be compared in order they appear in the configuration value, and the first string to match will end the search, meaning that earlier strings take priority over later values.

    Individual strings may be prefixed with a - (hyphen) to negate the match, which makes the string act as a filter rather than a search.

    The wildcard * (the default) may be used to match any context.

    Examples:

    • #important - Only messages from the #important channel that match all the other conditions will be pushed
    • -#notimportant * - Messages from #nonimportant will be ignored; everything else (*) will be matched
    • Set channel_conditions to (highlight or context) and context to #iwantitall - Now you'll get notifications for every message in #iwantitall and messages that match your highlight rules everywhere else.

Proxy

  • proxy Default: none

    This option allows using a proxy service when libcurl support is enabled. The default is no proxy. You must specify both the hostname/IP address and the port, as follows:

    • myproxy.example.com:8080
    • 203.0.113.5:8421
  • proxy_ssl_verify Default: yes

    This option allows you to disable SSL verification when using a proxy service. This should only be done when you know the proxy service does not transparently pass SSL connections through and you trust the proxy service. Set this to no to disable SSL validation in libcurl.

Advanced

  • channel_conditions Default: all

    This option allows customization of the boolean logic used to determine how conditional values are used to filter notifications for channel messages. It evaluates as a full boolean logic expression, including the use of sub-expressions. The default value of all will bypass this evaluation and simply require all conditions to be true.

    The expression consists of space-separated tokens in the following grammar:

    • expression = <expression> <operator> <expression> | ( <expression> ) | <value>
    • operator = and | or
    • value = true | false | <condition>
    • condition = <any condition option>

    As a simple example, to replicate the default all value, would be the value of away_only and client_count_less_than and highlight and idle and last_active and last_notification and nick_blacklist and replied.

    Alternately, setting a value of true would send a notification for every message, while a value of false would never send a notification.

    For a more complicated example, the value of client_count_less_than and highlight and (last_active or last_notification or replied) and nick_blacklist would send a notification if any of the three conditions in the sub-expression are met, while still requiring all of the conditions outside of the parentheses to also be met.

    Specifying all is equivalent to:

    • away_only and client_count_less_than and highlight and idle and last_active and last_notification and nick_blacklist and replied and context
  • query_conditions Default: all

    This option is more or less identical to channel_conditions, except that it is used to filter notifications for private messages.

    Specifying all is equivalent to:

    • away_only and client_count_less_than and idle and last_active and last_notification and nick_blacklist and replied
  • debug Default: off

    When set to on, this option enables debug output for various features, and is useful in troubleshooting problems like failed push notifications. Debug output will show up in your *push window.

License

This project is copyright Amethyst Reese, and licensed under the MIT license. I am providing code in this repository to you under an open source license. Because this is my personal repository, the license you receive to my code is from me and not from my employer. See the LICENSE file for details.

znc-push's People

Contributors

alok0 avatar amyreese avatar appzer avatar cbenard avatar dgw avatar frostman avatar fruitiex avatar ggrog avatar gtmanfred avatar inanimate avatar jessesung avatar jgoguen avatar jonher937 avatar justerhan avatar kami avatar larsks avatar mcrute avatar mrrcollins avatar naine avatar nothing4you avatar omnidan avatar phit avatar qauff avatar raimue avatar reisen avatar rene00 avatar rohandhruva avatar rsrchboy avatar syphernl avatar terminalmage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

znc-push's Issues

Configurable grace period for user to reply before sending notification

With the way I've been using the push module, I've been thinking it would be nice to be able to set a reply_grace (or a better name) option to delay sending notifications and wait for me to reply to the window, if at least one client is connected (but not idle). If I don't reply in that context within the grace period, the notification goes out as normal.

This would be very helpful, since I'm often getting notifications just from not attending to a string of PMs or highlights quickly enough, but I'm active in another context.

znc-push does not support PushBullet device_iden

EDIT: Changing target from device_iden to the id works. See comment below.

I did a git pull and reinstalled a few minutes back. Unfortunately, it seems pushing to my phone is no longer working:

set service pushbullet
<_push> Note: Pushbullet requires setting both 'target' (to device id) and 'secret' (to api key) options
<_push> Ok
set secret <KEY from https://www.pushbullet.com/account>
<_push> Ok
set target udne6djAuXDo0g56
<_push> Ok
send testing
<_push> Ok
subscribe
<_push> Error: service does not support subscribe command
send testing
<_push> Ok
set username rohandhruva
<_push> Ok
send testing
<_push> Ok
set username [email protected]
<_push> Ok
send testing
<_push> Ok
get username
<_push> username: [email protected]
get service
<_push> service: pushbullet
get secret
<_push> secret: <KEY from https://www.pushbullet.com/account>
get target
<_push> target: udne6djAuXDo0g56
send "test message"
<_push> Ok

Nothing appears on my phone or in my pushbullet inbox. Let me know if I can provide any logs to help debug the issue. Thanks.

Copy config accross all networks?

I have a user set up with 22 networks.
Following the instructions, I got znc-push working, but it only works on one network. It works under others, but I have to repeat the set up for each one.

Is there a way to copy the config so that it works for all networks under that user? I really don't have time to set it up 22 times....

Perhaps I loaded the module wrong?

ipv6 branch not building

bkerensa@cloud:/usr/share/znc/modules$ sudo znc-buildmod push.cpp
Building "push.so" for znc 0.206... push.cpp:7:19: warning: character constant too long for its type [enabled by default]
push.cpp:9:9: error: stray '\302' in program
push.cpp:9:9: error: stray '\267' in program
push.cpp:9:9: error: stray '\302' in program
push.cpp:9:9: error: stray '\267' in program
push.cpp:33:17: warning: character constant too long for its type [enabled by default]
push.cpp:33:34: warning: character constant too long for its type [enabled by default]
push.cpp:122:91: warning: character constant too long for its type [enabled by default]
push.cpp:124:88: warning: character constant too long for its type [enabled by default]
push.cpp:145:47: warning: missing terminating ' character [enabled by default]
push.cpp:145:9: error: missing terminating ' character
push.cpp:147:9: error: stray '\342' in program
push.cpp:147:9: error: stray '\206' in program
push.cpp:147:9: error: stray '\221' in program
push.cpp:148:9: error: stray '\342' in program
push.cpp:148:9: error: stray '\206' in program
push.cpp:148:9: error: stray '\223' in program
push.cpp:259:46: error: invalid suffix "ca999a0975d0fe95649ccb195cb47e3" on integer constant
push.cpp:260:62: error: invalid suffix "ca999a0975d0fe95649ccb195cb47e3" on integer constant
push.cpp:274:9: error: stray '#' in program
push.cpp:1730:56: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:66: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:778: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:788: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:817: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:827: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:17: error: stray '#' in program
push.cpp:1730:893: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:903: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:932: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:942: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:17: error: stray '#' in program
push.cpp:1730:1016: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1026: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:17: error: stray '#' in program
push.cpp:1730:1101: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1111: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:17: error: stray '#' in program
push.cpp:1730:1186: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1196: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:17: error: stray '#' in program
push.cpp:1730:1274: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1284: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:17: error: stray '#' in program
push.cpp:1730:1359: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1369: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:17: error: stray '#' in program
push.cpp:1730:1449: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1459: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1488: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1498: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:17: error: stray '#' in program
push.cpp:1730:1659: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1669: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:17: error: stray '#' in program
push.cpp:1730:1761: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1771: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:17: error: stray '#' in program
push.cpp:1730:1825: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1835: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1864: warning: multi-character character constant [-Wmultichar]
push.cpp:1730:1874: warning: multi-character character constant [-Wmultichar]
push.cpp:1816:5: error: stray '#' in program
push.cpp:1816:5: error: stray '#' in program
push.cpp:1822:7: error: stray '#' in program
push.cpp:1842:38: warning: character constant too long for its type [enabled by default]
push.cpp:1862:51: warning: character constant too long for its type [enabled by default]
push.cpp:1877:9: error: stray '\342' in program
push.cpp:1877:9: error: stray '\214' in program
push.cpp:1877:9: error: stray '\230' in program
push.cpp:1881:9: error: stray '\342' in program
push.cpp:1881:9: error: stray '\214' in program
push.cpp:1881:9: error: stray '\230' in program
push.cpp:1888:37: warning: character constant too long for its type [enabled by default]
push.cpp:1912:11: error: stray '\342' in program
push.cpp:1912:11: error: stray '\214' in program
push.cpp:1912:11: error: stray '\230' in program
push.cpp:1916:11: error: stray '\342' in program
push.cpp:1916:11: error: stray '\214' in program
push.cpp:1916:11: error: stray '\230' in program
push.cpp:1945:37: warning: character constant too long for its type [enabled by default]
push.cpp:1968:37: warning: character constant too long for its type [enabled by default]
push.cpp:1975:11: error: stray '\342' in program
push.cpp:1975:11: error: stray '\206' in program
push.cpp:1975:11: error: stray '\220' in program
push.cpp:1979:11: error: stray '\342' in program
push.cpp:1979:11: error: stray '\206' in program
push.cpp:1979:11: error: stray '\222' in program
push.cpp:1983:11: error: stray '\342' in program
push.cpp:1983:11: error: stray '\206' in program
push.cpp:1983:11: error: stray '\221' in program
push.cpp:1987:11: error: stray '\342' in program
push.cpp:1987:11: error: stray '\206' in program
push.cpp:1987:11: error: stray '\223' in program
push.cpp:1997:11: error: stray '\342' in program
push.cpp:1997:11: error: stray '\206' in program
push.cpp:1997:11: error: stray '\220' in program
push.cpp:2001:11: error: stray '\342' in program
push.cpp:2001:11: error: stray '\206' in program
push.cpp:2001:11: error: stray '\222' in program
push.cpp:2005:11: error: stray '\342' in program
push.cpp:2005:11: error: stray '\206' in program
push.cpp:2005:11: error: stray '\221' in program
push.cpp:2009:11: error: stray '\342' in program
push.cpp:2009:11: error: stray '\206' in program
push.cpp:2009:11: error: stray '\223' in program
push.cpp:2041:37: warning: character constant too long for its type [enabled by default]
push.cpp:2047:11: error: stray '\342' in program
push.cpp:2047:11: error: stray '\214' in program
push.cpp:2047:11: error: stray '\230' in program
push.cpp:2066:37: warning: character constant too long for its type [enabled by default]
push.cpp:2111:3: error: invalid preprocessing directive #This
push.cpp:2112:1: error: stray '##' in program
push.cpp:2113:1: error: stray '##' in program
push.cpp:2113:1: error: stray '##' in program
push.cpp:2113:1: error: stray '##' in program
push.cpp:2130:10: error: invalid suffix "a" on integer constant
push.cpp:2131:10: error: invalid suffix "b" on integer constant
push.cpp:2137:11: error: invalid suffix "a" on integer constant
push.cpp:2138:11: error: invalid suffix "b" on integer constant
push.cpp:2155:5: warning: missing terminating ' character [enabled by default]
push.cpp:2155:1: error: missing terminating ' character
push.cpp:2166:1: error: stray '' in program push.cpp:2166:1: error: stray '' in program
push.cpp:2166:1: error: stray '' in program push.cpp:2169:20: warning: multi-character character constant [-Wmultichar] push.cpp:2172:1: error: stray '' in program
push.cpp:2172:1: error: stray '' in program push.cpp:2172:1: error: stray '' in program
push.cpp:2188:1: error: stray '' in program push.cpp:2188:1: error: stray '' in program
push.cpp:2220:14: warning: character constant too long for its type [enabled by default]
push.cpp:2220:47: warning: character constant too long for its type [enabled by default]
push.cpp:2220:67: warning: multi-character character constant [-Wmultichar]
push.cpp:4:1: error: expected unqualified-id before '<' token
push.cpp:1730:981: error: 'znc' does not name a type
push.cpp:1730:992: error: expected unqualified-id before '<' token
push.cpp:1730:1065: error: 'Chan' does not name a type
push.cpp:1730:1077: error: expected unqualified-id before '<' token
push.cpp:1730:1150: error: 'User' does not name a type
push.cpp:1730:1162: error: expected unqualified-id before '<' token
push.cpp:1730:1235: error: 'Modules' does not name a type
push.cpp:1730:1250: error: expected unqualified-id before '<' token
push.cpp:1730:1323: error: 'time' does not name a type
push.cpp:1730:1335: error: expected unqualified-id before '<' token
push.cpp:1730:1408: error: 'FileUtils' does not name a type
push.cpp:1730:1425: error: expected unqualified-id before '<' token
push.cpp:1730:1610: error: expected constructor, destructor, or type conversion before ';' token
push.cpp:1730:1612: error: 'VERSION_MINOR' does not name a type
push.cpp:1730:1631: error: expected unqualified-id before numeric constant
push.cpp:1768:65: error: 'Support' does not name a type
push.cpp:1815:17: error: expected unqualified-id before numeric constant
push.cpp:2112:19: error: 'h2' does not name a type
push.cpp:2112:26: error: 'tag' does not name a type
push.cpp:2113:23: error: 'h6' does not name a type
push.cpp:2113:30: error: 'tag' does not name a type
push.cpp:2172:4: error: expected unqualified-id before '<' token
push.cpp:2188:6: error: 'addr' does not name a type
push.cpp:2188:16: error: 'element' does not name a type
[ !! ] Error while building "push.so"

notably znc-build which is in doc returns command not known I am assuming znc deprecated this.

Module Loaded But Notifications Not Pushed

So I tried Notifo and it didnt work (but apparently its been having issues) so I then bought the Pushover app for android and set it in push and set the secret and then did a "send message" and no notification... Enabled debug and tried again and no notification and no error either?

Not sure whats going on here but I would love to get this sorted.

[REQ] Email support (via direct socket)

I'd love to see support for good ol' email, ideally using a direct socket to the SMTP server so "mail" and its dependencies don't need to be dropped into chrooted environments.

If "message_content" doesn't currently process escape characters, that will need to be added as well.

[REQ] Per Channel-Configuration

I'd like to be informed about highlights only in selected channels.
Id think about a configuration like:

highlight = "#foo:mynick"
or
channel_conditions = "(#foo and all) or false"

Undefined Symbol Error

Pulled down the latest ZNC and ZNC-push via git this morning, rebuilt and installed znc, then rebuilt (via make) the latest znc-push. When I restart znc I get the following error:

[ .. ] Loading network module [push]...
[ !! ] Unable to open module [push] [/home/jestre/.znc/modules/push.so: undefined symbol: _ZN7CModule16OnChanPermissionEPK5CNickRS1_R5CChanhbb]

Did I miss something?

Unable to open module

Compiled and installed using latest source as per instructions in the readme file. (curl=yes)

when it came to /msg *status loadmod push I received the following error

Unable to find modinfo [push] [Unable to open module [push] [/home/greg/.znc/modules/push.so: undefined symbol: _ZN5Csock7SetRateEjy]]

System is Debian 7.2
ZNC version 1.3-git-25-c99eeda

Where can I put a document on configuration for pushover

I just figured out how exactly to configure the push module with pushover, and I would like to improve the document to highlight the fact that you need to register your application, and use the user secrete as the username filed, and use application token as the secrete field.

I can do into a list of detailed step if you think that makes sense. Please let me know if you think it is a good idea and where I can submit the content.

Thanks

Different notification settings for channel highlight and PM

Hello,

Is there away to setup znc-push so that I get a notification on channel highlights all the time however when I get a PM it only sends a notification if I have replied to the PM and the last reply was over X seconds ago or it was new PM from someone else?

At the moment I have it setup to notify all of the time on everything however this does mean have a lot of alerts on my phone when I speak with someone via a PM

Thanks

Compiles, but doesn't load in ZNC 1.1

Hi, I'm having problems installing push. My old install worked, but I'm using the ZNC from the Debian/Ubuntu ZNC nightlies repo and I get this error when loading znc:

[    ] Loading network module [push]... [ Unable to open module [push] [/etc/znc/modules/push.so: und
[ !! ] symbol: _ZN5Csock7SetRateEjm] ]
[ ** ] Unable to open module [push] [/etc/znc/modules/push.so: undefined symbol: _ZN5Csock7SetRateEjm]
[ ** ] Unrecoverable config error.

> znc --version
ZNC 1.1-git-45-ef59c23 - http://znc.in
IPv6: yes, SSL: yes, DNS: threads

Thanks for your help, I'm looking forward to having push working again.

Using IPV6 breaks push notifications

This has been a known, ongoing issue for a while. This issue will track attempts at fixing this for good.

Currently, there are two known workarounds: 1) compile ZNC without support for IPV6, or 2) configure ZNC to use an IPV4 bindhost. Depending on which version of ZNC you are using, the second option may or may not work.

Update for Boxcar 2

This module is great, but it would be even better if it supported Boxcar 2 (which does away with accounts and just has secrets), since the original Boxcar is going away soon. Could you please look into implementing support for it?

REQUEST: post to Google+

If notifications are pushed to Google+ through the API, they can be viewed on most mobile devices or browsers. It will also provide email alerts if desired and will be a more permanent record of IRC channel activity.

Problem to be solved:
Pushover/Prowl notifications can't be viewed on a desktop browser

Use case:
Add highlight for "http"
All web links are pushed to G+ to be viewed anywhere

Feature Request: Notify by hitting an arbitrary URL

It would be really handy for me if there was a way to have ZNC make a GET request to a URL of my specification with the notification data in it. I've written my own notification app (as all the ones for Android wanted money), which can be triggered by hitting a URL, but I don't speak C++ so I can't write this part of it. If somebody wanted to code this that'd be really cool and very much appreciated

Bundle the high-res ZNC logo with znc-push

Now that the Pushover key is no longer hard coded, it would be great to get the ZNC logo that you were using for the app, since the only one I have found like it online is too small. If you could provide it, that would be great. I see the logo.png in the repository, but the actual ZNC logo would be awesome.

PushBullet notifications do not work

Ubuntu 12.04, znc 0.206, znc-push built without curl support (because of #78).

/msg *status load push
/msg *push set service pushbullet
/msg *push set secret ...
/msg *push set target ...
/msg *push set debug on
/msg *push send waah

I see

<*push> service: pushbullet
 service_host: api.pushbullet.com
 service_url: /api/pushes
 service_auth: ...
 use_port: 443
 use_ssl: 1
 use_post: 1
 NOT using libcurl
 Building notification to api.pushbullet.com/api/pushes...
 Query string: body=waaah&device_iden=...&title=New+Message&type=note
 Request sending
 Ok

and yet the message doesn't reach my phone.

Testing with curl on the command line shows that all the arguments and secret keys are correct:

curl https://api.pushbullet.com/api/pushes -u $SECRET: -d body=ohffs -d title=zomg -d device_iden=$ID -d type=note -X POST

Notfio not working?

New to this plugin and notifo, so I could just be something I screwed up, but I'm pretty sure I did everything right:

  1. Download, compile and install znc-push, worked fine
  2. load the module, worked fine
  3. Sign up for notifo, seems to work fine
  4. PM *push set service notifo, set username thefinn93 and set secret xxxx where xxxx is the API Secret from this page. *push replies "Ok" to all of those
  5. /msg *push send test - nothing happens. I checked notifo's site, refreshed, waited a day, refreshed again, nothing. Am I missing something?

curl support doesn't work

After I fixed #76 and made it build:

$ make install curl=yes
sed -i -e "s|PUSHVERSION \".*\"|PUSHVERSION \"v1.0.0-46-g20d3f02-dirty\"|" push.cpp
CXXFLAGS=" -DUSE_CURL -lcurl " LIBS=" -DUSE_CURL -lcurl " znc-buildmod push.cpp
Building "push.so" for znc 0.206... [ ok ]
sed -i -e "s|PUSHVERSION \".*\"|PUSHVERSION \"dev\"|" push.cpp
cp push.so /home/mg/.znc/modules/push.so

But I couldn't get it to load:

/msg *status load push
<*status> Unable to find modinfo [push] [Unable to open module [push] [/home/mg/.znc/modules/push.so: undefined symbol: curl_easy_setopt]]

and indeed the module is not linked against libcurl.so:

$ ldd /home/mg/.znc/modules/push.so
    linux-vdso.so.1 =>  (0x00007fff403ff000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007feba1ef6000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007feba1ce0000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007feba191f000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007feba1623000)
    /lib64/ld-linux-x86-64.so.2 (0x00007feba2425000)

I suspect (but have no proof) that znc-buildmod from znc-dev 0.206 ignores the LIBS environment variable.

Fails to build on Ubuntu 12.04 LTS with znc/IRCNetwork.h: No such file or directory

The README claims support for ZNC versions as old as 0.078. Ubuntu 12.04 LTS comes with znc 0.206. When I try to build there, I get the following error:

$ sudo apt-get install znc-dev libcurl4-openssl-dev
$ make curl=yes
sed -i -e "s|PUSHVERSION \".*\"|PUSHVERSION \"v1.0.0-46-g20d3f02-dirty\"|" push.cpp
CXXFLAGS=" -DUSE_CURL -lcurl" LIBS=" -DUSE_CURL -lcurl" znc-buildmod push.cpp
Building "push.so" for znc 0.206... push.cpp:17:28: fatal error: znc/IRCNetwork.h: No such file or directory
compilation terminated.
[ !! ] Error while building "push.so"
make: *** [push.so] Error 1

Looks like 6c413a9 broke compatibility with older znc versions.

[REQ] Notify only after sender stops talking

When someone sends me a message, often, they send multiple. I'd like all messages to be sent to me in one notification five minutes after the most recent message. If another message is received before the timer is up, the timer should reset, thereby providing a means of pushing notifications only when the sender is done talking.

Naturally, the delay should be configurable.

*.so compile issue

Well.. first off, i attempted to compile using your methods with no success. (Not sure what I was doing wrong).

I took a look at ZNC's method of compiling documentation. and i receive this error:

[stanlee@users ~/.znc/modules/znc-push]$ znc-buildmod push.cpp
Building "push.so" for znc 0.206... push.cpp:16:28: error: znc/IRCNetwork.h: No such file or directory
push.cpp: In member function 'bool CPushMod::away_only()':
push.cpp:562: error: 'GetNetwork' was not declared in this scope
push.cpp: In member function 'unsigned int CPushMod::client_count()':
push.cpp:572: error: 'GetNetwork' was not declared in this scope
push.cpp: In member function 'bool CPushMod::highlight(const CString&)':
push.cpp:616: error: 'm_pNetwork' was not declared in this scope
push.cpp: In member function 'bool CPushMod::nick_blacklist(const CNick&)':
push.cpp:704: error: 'm_pNetwork' was not declared in this scope
push.cpp: In member function 'virtual void CPushMod::OnModCommand(const CString&)':
push.cpp:1279: error: 'GetNetwork' was not declared in this scope
[ !! ] Error while building "push.so"

I may have missed something blatantly obvious.. any help?

Doesn't push to Boxcar

I compiled and installed the module on my vps (centos 5) and configured it.
I got a notification in boxcar once that znc was added to my services.
However mentions / private messages don't get pushed to boxcar.
I didn't set "secret" because i couldn't find it on the boxcar website and the readme shows to use subscribe instead. Do i have to set this too?

Fails to build on ZNC 0.207 dev build

See edk0@d603af8

I was able to replicate this bug on a dev checkout and build of version 0.207 from upstream ZNC git repo. I would like to be able to maintain compatibility with older releases without needing separate codebases.

Private messages

When znc-push module activated I can't recieve private messages which were sent while I was detached from ZNC. PMs are pushing to my Notifo account, and logging by log module, but there are no new PMs in my irc-client (irssi) when I'm attaching to ZNC.

Doesn't appear to be sending notification to NMA

I've read the setup doc several times, but it doesn't appear to send any notifications.
Am I just missing something obvious?

Host: Debian Squeeze, amd64
ZNC version 1.2
ZNC-push version - git SHA 77ce3e8 (built with curl)

/msg *push get
<*push> +------------------------+--------------------------------------------------+
<*push> | Option                 | Value                                            |
<*push> +------------------------+--------------------------------------------------+
<*push> | away_only              | no                                               |
<*push> | channel_conditions     | all                                              |
<*push> | client_count_less_than | 0                                                |
<*push> | debug                  | on                                               |
<*push> | highlight              | dark                                             |
<*push> | idle                   | 0                                                |
<*push> | last_active            | 180                                              |
<*push> | last_notification      | 300                                              |
<*push> | message_content        | {message}                                        |
<*push> | message_length         | 100                                              |
<*push> | message_priority       | 0                                                |
<*push> | message_sound          |                                                  |
<*push> | message_title          | {title}                                          |
<*push> | message_uri            |                                                  |
<*push> | message_uri_title      |                                                  |
<*push> | nick_blacklist         |                                                  |
<*push> | query_conditions       | all                                              |
<*push> | replied                | yes                                              |
<*push> | service                | nma                                              |
<*push> | target                 |                                                  |
<*push> | username               | darknighte                                       |
<*push> +------------------------+--------------------------------------------------+

Compiles, but doesnt load ZNC 1.0

So it will build the module from the cpp file to a .so file in ~/znc/modules/push.so but it will not load when i type /msg *status loadmod push

Boxcar push don't work.

It seem that something was wrong boxcar don't work.

It show a 404 Not found after Query

_push> Building notification to boxcar.io/devices/providers/pxxxxxxxxxxxxxxxxxxb9/notifications...
<_push> Query string: email=%3D+%22asdasd%40gmail.com%22&notification%5Bfrom_screen_name%5D=%2Apush&notification%5Bmessage%5D=%3Ctest+message%3E&notification%5Bsource_url%5D=
<_push> Request sending
<_push> Ok
<_push> 404
<_push> Not Found
<_push> Content-Type: text/html; charset=utf-8
<_push> Content-Length: 1
<_push> Connection: close
<_push> Status: 404 Not Found
<_push> Cache-Control: no-cache
<_push> X-Runtime: 5
<_push> Set-Cookie: _boxcar-api_session=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc; path=/; HttpOnly
<_push> X-Powered-By: Phusion Passenger 4.0.23
<_push> Date: Mon, 13 Jan 2014 00:56:23 GMT
<_push> Server: nginx/1.4.3 + Phusion Passenger 4.0.23
<*push>

Bind IP

Hello. I was wondering if you can tweak the script a bit, to have it not use the znc's IP, but use the system's default IP instead. I'm using a znc via a rfc1918 vpn that doesn't allow port 80 traffic, so all http requests to the push service api aren't sent.

Thank you.

highlight broken?

Hi, I have this situation:

ta: get highlight
*push: highlight: "ta: ta, ta! ta? _ta -ta"

The aim is to receive push when...

  1. message contains "ta:" or "ta," or "ta!" or "ta?" or " ta ".
  2. message NOT contains things like "data" or "task".

This used to work with ZNC 0.x and your legacy branch, but with ZNC 1.0 and your master branch messages like "data" or "task" are being highlighted in spite of the "-ta".

Is this a bug, feature or user error?

My environment:

ta@eagle:~/.znc/src/znc-push$ uname -a
Linux eagle 3.2.0-23-virtual #36-Ubuntu SMP Tue Apr 10 22:29:03 UTC 2012 x86_64 GNU/Linux
ta@eagle:~/.znc/src/znc-push$ znc --version
ZNC 1.0+deb2ubuntu1 - http://znc.in
IPv6: yes, SSL: yes, DNS: threads
ta@eagle:~/.znc/src/znc-push$ git branch
  legacy
* master
ta@eagle:~/.znc/src/znc-push$ cat .git/refs/heads/master
3e13fe55f97bef090d4d5bdcb92707e562c162b2

Unable to compile for ZNC 1.0

I have installed the latest version of ZNC (http://znc.in/releases/znc-1.0.tar.gz)

I am getting the following error

$ ~/znc/bin/znc-buildmod push.cpp
Building "push.so" for ZNC 1.0... push.cpp: In member function ‘bool CPushMod::highlight(const CString&)’:
push.cpp:543:27: error: ‘class CPushMod’ has no member named ‘ExpandString’
push.cpp: In member function ‘bool CPushMod::nick_blacklist(const CNick&)’:
push.cpp:617:28: error: ‘class CPushMod’ has no member named ‘ExpandString’
[ !! ] Error while building "push.so"

OS: Ubuntu 12.04 LTS 64bit

Any ideas on how to fix this?

Thanks

Problems compiling on Debian Wheezy on ARM processor

Hi. Thank you for writing this.. I look forward to using it.

I am having difficulty compiling this on Debian Wheezy on an ARM processor. I've installed these packages for ZNC:

root@debian# dpkg -l | grep -i znc
ii znc 0.206-2 armel advanced modular IRC bouncer
ii znc-dev 0.206-2 armel advanced modular IRC bouncer (development headers)
ii znc-extra 0.206-2 armel extra modules for znc

When running make I get this output:

root@debian# make
fatal: Not a git repository (or any of the parent directories): .git
sed -i -e "s|PUSHVERSION "."|PUSHVERSION ""|" push.cpp
CXXFLAGS=" " znc-buildmod push.cpp
Building "push.so" for znc 0.206... push.cpp:17:28: fatal error: znc/IRCNetwork.h: No such file or directory
compilation terminated.
[ !! ] Error while building "push.so"
make: *
* [push.so] Error 1

I've tried downloading the znc zip from github and hard coding the path into push.cpp like this:

include </root/working/znc/znc-push-master/znc/IRCNetwork.h>

Unfortunately make still does not build successfully:

fatal: Not a git repository (or any of the parent directories): .git
sed -i -e "s|PUSHVERSION "."|PUSHVERSION ""|" push.cpp
CXXFLAGS=" " znc-buildmod push.cpp
Building "push.so" for znc 0.206... In file included from push.cpp:17:0:
/root/working/znc/znc-push-master/znc/IRCNetwork.h: In member function 'void CIRCNetwork::UpdateRawBuffer(const CString&, const CString&, const CString&)':
/root/working/znc/znc-push-master/znc/IRCNetwork.h:125:144: error: no matching function for call to 'CBuffer::UpdateLine(const CString&, const CString&, const CString&)'
/root/working/znc/znc-push-master/znc/IRCNetwork.h:125:144: note: candidate is:
/usr/include/znc/Buffer.h:46:6: note: int CBuffer::UpdateLine(const CString&, const CString&, bool)
/usr/include/znc/Buffer.h:46:6: note: no known conversion for argument 3 from 'const CString' to 'bool'
/root/working/znc/znc-push-master/znc/IRCNetwork.h: In member function 'void CIRCNetwork::UpdateMotdBuffer(const CString&, const CString&, const CString&)':
/root/working/znc/znc-push-master/znc/IRCNetwork.h:130:146: error: no matching function for call to 'CBuffer::UpdateLine(const CString&, const CString&, const CString&)'
/root/working/znc/znc-push-master/znc/IRCNetwork.h:130:146: note: candidate is:
/usr/include/znc/Buffer.h:46:6: note: int CBuffer::UpdateLine(const CString&, const CString&, bool)
/usr/include/znc/Buffer.h:46:6: note: no known conversion for argument 3 from 'const CString' to 'bool'
/root/working/znc/znc-push-master/znc/IRCNetwork.h: In member function 'void CIRCNetwork::UpdateQueryBuffer(const CString&, const CString&, const CString&)':
/root/working/znc/znc-push-master/znc/IRCNetwork.h:134:148: error: no matching function for call to 'CBuffer::UpdateLine(const CString&, const CString&, const CString&)'
/root/working/znc/znc-push-master/znc/IRCNetwork.h:134:148: note: candidate is:
/usr/include/znc/Buffer.h:46:6: note: int CBuffer::UpdateLine(const CString&, const CString&, bool)
/usr/include/znc/Buffer.h:46:6: note: no known conversion for argument 3 from 'const CString' to 'bool'
push.cpp: In member function 'bool CPushMod::away_only()':
push.cpp:607:40: error: 'GetNetwork' was not declared in this scope
push.cpp: In member function 'size_t CPushMod::client_count()':
push.cpp:617:22: error: 'GetNetwork' was not declared in this scope
push.cpp: In member function 'bool CPushMod::highlight(const CString&)':
push.cpp:661:9: error: 'm_pNetwork' was not declared in this scope
push.cpp: In member function 'bool CPushMod::idle()':
push.cpp:698:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
push.cpp: In member function 'bool CPushMod::last_active(const CString&)':
push.cpp:713:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
push.cpp: In member function 'bool CPushMod::last_notification(const CString&)':
push.cpp:728:50: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
push.cpp: In member function 'bool CPushMod::nick_blacklist(const CNick&)':
push.cpp:749:9: error: 'm_pNetwork' was not declared in this scope
push.cpp: In member function 'virtual void CPushMod::OnModCommand(const CString&)':
push.cpp:1324:40: error: 'GetNetwork' was not declared in this scope
push.cpp: In member function 'size_t CPushMod::client_count()':
push.cpp:618:3: warning: control reaches end of non-void function [-Wreturn-type]
push.cpp: In member function 'bool CPushMod::away_only()':
push.cpp:608:3: warning: control reaches end of non-void function [-Wreturn-type]
[ !! ] Error while building "push.so"
make: *
* [push.so] Error 1

You can probably tell that I am a Linux novice and I very well be doing things in a totally backwards way. Can you tell me what I'm doing wrong and what I might do to get things to compile? Your help is greatly appreciated!

cant build

Using znc-buildmod from version 1.0-rc1. yesterday i was able to build, today after a reinstall i'm not. First it complained about not finden znc.h, i prepended znc/ in front of all included files (except time.h).
But when i try to build i get this, with the push.cpp file from master or ipv6:

/usr/local/bin/znc-buildmod push.cpp

Building "push.so" for ZNC 1.0-rc1... push.cpp:85:3: error: ‘map’ does not name a type
push.cpp:88:3: error: ‘map’ does not name a type
push.cpp:91:3: error: ‘map’ does not name a type
push.cpp: In member function ‘void CPushMod::send_message(const CString&, const CString&, const CString&, const CNick&)’:
push.cpp:193:4: error: ‘last_notification_time’ was not declared in this scope
push.cpp: In member function ‘bool CPushMod::away_only()’:
push.cpp:497:3: error: expected ‘;’ before ‘}’ token
push.cpp: In member function ‘unsigned int CPushMod::client_count()’:
push.cpp:506:17: error: ‘class CUser’ has no member named ‘GetClients’
push.cpp: In member function ‘bool CPushMod::highlight(const CString&)’:
push.cpp:557:23: error: ‘class CUser’ has no member named ‘GetIRCNick’
push.cpp:559:40: error: ‘string’ has not been declared
push.cpp: In member function ‘bool CPushMod::last_active(const CString&)’:
push.cpp:591:8: error: ‘last_active_time’ was not declared in this scope
push.cpp: In member function ‘bool CPushMod::last_notification(const CString&)’:
push.cpp:606:8: error: ‘last_notification_time’ was not declared in this scope
push.cpp: In member function ‘bool CPushMod::replied(const CString&)’:
push.cpp:644:8: error: ‘last_notification_time’ was not declared in this scope
push.cpp:645:42: error: ‘last_reply_time’ was not declared in this scope
push.cpp: In member function ‘virtual CModule::EModRet CPushMod::OnUserMsg(CString&, CString&)’:
push.cpp:821:4: error: ‘last_reply_time’ was not declared in this scope
push.cpp:821:30: error: ‘last_active_time’ was not declared in this scope
push.cpp: In member function ‘virtual CModule::EModRet CPushMod::OnUserAction(CString&, CString&)’:
push.cpp:833:4: error: ‘last_reply_time’ was not declared in this scope
push.cpp:833:30: error: ‘last_active_time’ was not declared in this scope
push.cpp: In member function ‘virtual void CPushMod::OnModCommand(const CString&)’:
push.cpp:1201:10: error: ‘last_active_time’ was not declared in this scope
push.cpp:1214:10: error: ‘last_notification_time’ was not declared in this scope
push.cpp: In member function ‘unsigned int CPushMod::client_count()’:
push.cpp:507:3: warning: control reaches end of non-void function [-Wreturn-type]
push.cpp: In member function ‘bool CPushMod::replied(const CString&)’:
push.cpp:646:3: warning: control reaches end of non-void function [-Wreturn-type]
push.cpp: In member function ‘bool CPushMod::last_active(const CString&)’:
push.cpp:593:3: warning: control reaches end of non-void function [-Wreturn-type]
push.cpp: In member function ‘bool CPushMod::last_notification(const CString&)’:
push.cpp:608:3: warning: control reaches end of non-void function [-Wreturn-type]
[ !! ] Error while building "push.so"

Can't load plugin in znc v1.0

I can't load this plugin and I don't know why:

[21:42:43] loadmod push --type=global
[21:42:43] <*status> Unable to find modinfo [push] [Unable to open module [push] [/home/znc/.znc/modules/push.so: undefined symbol: _ZN5Csock7ConnectERK7CStringb]]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.