Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/notification/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/notification/irc.pyc

�
�Udac@`sddlmZmZmZeZidd6dgd6dd6ZdZd	Zdd
l	Z	dd
l
Z
dd
lZdd
lZdd
l
Z
ddlmZmZddlmZd
dd
d
d
d
ddedeed
d�
Zd�Zedkr�e�nd
S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontstableinterfacetstatust	communitytsupported_bys�	
---
module: irc
version_added: "1.2"
short_description: Send a message to an IRC channel
description:
   - Send a message to an IRC channel. This is a very simplistic implementation.
options:
  server:
    description:
      - IRC server name/address
    default: localhost
  port:
    description:
      - IRC server port number
    default: 6667
  nick:
    description:
      - Nickname to send the message from. May be shortened, depending on server's NICKLEN setting.
    default: ansible
  msg:
    description:
      - The message body.
    required: true
  topic:
    description:
      - Set the channel topic
    version_added: "2.0"
  color:
    description:
      - Text color for the message. ("none" is a valid option in 1.6 or later, in 1.6 and prior, the default color is black, not "none").
        Added 11 more colors in version 2.0.
    default: "none"
    choices: [ "none", "white", "black", "blue", "green", "red", "brown", "purple", "orange", "yellow", "light_green", "teal", "light_cyan",
               "light_blue", "pink", "gray", "light_gray"]
  channel:
    description:
      - Channel name.  One of nick_to or channel needs to be set.  When both are set, the message will be sent to both of them.
    required: true
  nick_to:
    description:
      - A list of nicknames to send the message to. One of nick_to or channel needs to be set.  When both are defined, the message will be sent to both of them.
    version_added: "2.0"
  key:
    description:
      - Channel key
    version_added: "1.7"
  passwd:
    description:
      - Server password
  timeout:
    description:
      - Timeout to use while waiting for successful registration and join
        messages, this is to prevent an endless loop
    default: 30
    version_added: "1.5"
  use_ssl:
    description:
      - Designates whether TLS/SSL should be used when connecting to the IRC server
    type: bool
    default: 'no'
    version_added: "1.8"
  part:
    description:
      - Designates whether user should part from channel after sending message or not.
        Useful for when using a faux bot and not wanting join/parts between messages.
    type: bool
    default: 'yes'
    version_added: "2.0"
  style:
    description:
      - Text style for the message. Note italic does not work on some clients
    choices: [ "bold", "underline", "reverse", "italic" ]
    version_added: "2.0"

# informational: requirements for nodes
requirements: [ socket ]
author:
    - "Jan-Piet Mens (@jpmens)"
    - "Matt Martz (@sivel)"
s�
- irc:
    server: irc.example.net
    channel: #t1
    msg: Hello world

- local_action:
    module: irc
    port: 6669
    server: irc.example.net
    channel: #t1
    msg: 'All finished at {{ ansible_date_time.iso8601 }}'
    color: red
    nick: ansibleIRC

- local_action:
    module: irc
    port: 6669
    server: irc.example.net
    channel: #t1
    nick_to:
      - nick1
      - nick2
    msg: 'All finished at {{ ansible_date_time.iso8601 }}'
    color: red
    nick: ansibleIRC
N(t	to_nativetto_bytes(t
AnsibleModulet	localhostt6667tansibletnoneicC`s|d=krgn|}idd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6}id!d"6d#d$6d%d&6d'd(6}y||
}Wntk
r�d)}nXy||}d*|}Wntk
r	d)}nX|||}tjtjtj�}|rHtj|�}n|j|t|�f�|	r�|j	t
d+|	��n|j	t
d,|��|j	t
d-|||f��d)}tj�}x�|t|j
d.��7}tjd/|d0tj�}|r|jd1�}Pn%tj�||
kr?td2��ntjd3�q�|ru|j	t
d4||f��n|j	t
d5|��d)}tj�}x~|t|j
d.��7}tjd6||f|d0tjtjB�r�Pn%tj�||
krtd7��ntjd3�q�|d=k	rX|j	t
d8||f��tjd9�n|r�x.|D]#}|j	t
d:||f��qeWn|r�|j	t
d:||f��ntjd9�|r|j	t
d;|��|j	t
d<��tjd9�n|j�d=S(>ssend message to IRCt00twhitet01tblackt02tbluet03tgreent04tredt05tbrownt06tpurplet07toranget08tyellowt09tlight_greent10ttealt11t
light_cyant12t
light_bluet13tpinkt14tgrayt15t
light_graystboldst	underlinestreversestitalictss	PASS %s
s	NICK %s
sUSER %s %s %s :ansible IRC
is^:\S+ 00[1-4] (?P<nick>\S+) :tflagstnicks/Timeout waiting for IRC server welcome responseg�?sJOIN %s %s
s	JOIN %s
s^:\S+ 366 %s %s :s%Timeout waiting for IRC JOIN responsesTOPIC %s :%s
isPRIVMSG %s :%s
s	PART %s
sQUIT
N(tNonet	ExceptiontsockettAF_INETtSOCK_STREAMtssltwrap_sockettconnecttinttsendR	ttimeRtrecvtretsearchtMtgrouptsleeptItclose(tmsgtservertporttchanneltnick_totkeyttopicR5tcolortpasswdttimeouttuse_ssltparttstyletcolornumberststylechoicest	styletexttcolornumbert	colortexttmessagetirctmotdtstarttmatchtjoin((sD/usr/lib/python2.7/site-packages/ansible/modules/notification/irc.pytsend_msg�s�






  ,
$ 
c%C`s�tdtdtdd�dtdddd�d	tdd
�dtdtdd
�dtdt�dtddddgdddddddddddddd d!d"d#dg�d$tdddd%d&d'd(dg�d)tdt�d*td+t�d,t�d-td+t�d.tdddd/�d0tdd1dt�d2tdd1dt��d3td4d)dgg�}|jd}|jd}|jd	}|jd}|jd}|jd}|jd)}|jd,}|r�|r�|jdd5�n|jd*}	|jd-}
|jd.}|jd2}|jd0}
|jd$}y5t||||||	||||
|||
|�Wn9tk
r�}|jdd6t|�d7t	j
��nX|jd8td)|d	|d|�dS(9Nt
argument_specRJtdefaultRRKttypeR>iR5R
RMtrequiredtlistRIRPRtaliasestcolourtchoicesRRRRRRRRR R"R$R&R(R*R,R.RUR0R1R/R2RLRNtno_logRORQRRiRTtboolRStsupports_check_modetrequired_one_ofs/When topic is specified, a channel is required.sunable to send to IRC: %st	exceptiontchanged(R
tdicttFalsetTruetparamst	fail_jsonRaR7Rt	tracebackt
format_exct	exit_json(tmoduleRJRKR5RMRIRPRLRORNRQRRRSRTRUte((sD/usr/lib/python2.7/site-packages/ansible/modules/notification/irc.pytmain�sZ				$	














5*t__main__(t
__future__RRRRdt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLESRBR8R;R@Rutansible.module_utils._textRR	tansible.module_utils.basicR
R6RqRrRaRzt__name__(((sD/usr/lib/python2.7/site-packages/ansible/modules/notification/irc.pyt<module>s$


Sf	5

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]