To create new wiki account, please join us on #znc at freenode and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

Twitter

From ZNC
Jump to: navigation, search

This module implements a Twitter client. It can post new tweets to your account and monitor searches, users, your timeline and your @mentions. You can stream those feeds into the *twitter query window only for you or to channels of your choice.

Installing[edit]

The code for this module can be found here. Follow the Compiling modules page to compile it.

This module does not compile under ZNC version 1.0

Please note you need ZNC 0.072 or newer!

A further note, it seems like Twitter has changed their API, all the modules calls return a 404 error, and the twitter functionality is broken. (--FlyveHest (talk) 14:15, 13 November 2012 (UTC))

Usage[edit]

Arguments

This user module takes no arguments.

Read loading modules to learn more about loading modules.

Configuration[edit]

It's easy to configure. Here's the module's help output:

+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
| Command                                                                               | Description                                                                                                           |
+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
| LOGIN                                                                                 | Use this command to initially set up the client.                                                                      |
| TWEET <message>                                                                       | Posts a tweet to Twitter! You can also use /me <message> in this window.                                              |
| STATUS                                                                                | Shows basic info about the logged in user.                                                                            |
| WATCH (timeline|mentions|user <screenname>|search) [#channel|nick]                    | Creates a feed to watch. user + search do not need a login. No target = this window. See also: CHANGE.                |
| WATCH                                                                                 | Lists all active feeds.                                                                                               |
| CHANGE <id> (prefix|target|query|colors) <new val>                                    | Changes a feed's settings, <id> is the number from the WATCH list. Colors = (on|off). Query only applies to searches. |
| STYLE (user|@user|hashtag|link|timestamp|text) ([bold] [underline] [fore[,back]]|off) | Sets color and text style. Example: 'STYLE hashtag underline 4' would make all #hashtags red & underlined.            |
| STYLE                                                                                 | Shows active styles.                                                                                                  |
| DELETE <id>                                                                           | Deletes the feed with the number <id> from the WATCH list.                                                            |
| HELP                                                                                  | This help.                                                                                                            |
+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+

Example: "WATCH timeline" will allow you to watch all the tweets you are registered to on your twitter account in the "*twitter" window of your irc client. Add a channel or a user name after "WATCH timeline" to show it in a dedicated window of your irc client.

Note[edit]

Contact flakes on #znc/EFNet for bug reports and suggestions.

ToDo[edit]

  • Shorten URLs.
  • <@SilverLeo> if twitter target can be *tw, why not *status or some other putmodule?
  • would be nice to be able to disable the [time] by conf
  • <@SHiZNO> would be nice to be able to filter search results by language
  • <Znuff> if I'm following a person - and if I watch both Mentions and Timeline in the same window - when that person mentions me, I get the message twice in my window


mIRC Helper Script[edit]

A small script to double-click enable nicks (for fast tweet replyes) and #hashtags (opens a search in your browser of choice) in the *twitter channel.

Currently only monitors the *twitter window

; ZNC *twitter helper
; Done in 2010 by FlyveHest

; Variables needed
ON 1:START: {
  ; To match nicks
  set -e %twitterNickMatch *:

  ; To match hashtags
  set -e %twitterHashMatch #*
}

; Nick matching
ON ^1:HOTLINK:%twitterNickMatch:*twitter: {
  ; All nicks: from *twitter should be clickable

  return
}

ON 1:HOTLINK:%twitterNickMatch:*twitter {
  ; Insert "TWEET" reply in editbox
  /editbox -fp TWEET @ $+ $remove($1,:)
}

; Hashtag matching
ON ^1:HOTLINK:%twitterHashMatch:*twitter: {
  ; All #hashtags from *twitter should be clickable

  return
}

ON 1:HOTLINK:%twitterHashMatch:*twitter: {
  ; Doubleclicks on hashtags opens a twitter search on the clicked tag
  run $+(http://search.twitter.com/search?q=%23, $remove($1,$chr(35)))
}

Information about loading mIRC scripts can be found here.