Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(15)  |  Call(15)  |  Derive(0)  |  Import(0)

src/s/f/sftmumblebot-HEAD/IRCConnection.py   sftmumblebot(Download)
	def _initConnection(self):
		if not self._sendMessage("NICK %s" % self._nickname):
			raise Exception("could not send NICK message.")
		if not self._sendMessage("USER %s %s bla :%s" % (self._nickname, self._hostname, self._nickname)):
			raise Exception("could not send USER message.")
		if not self._sendMessage("JOIN #%s" % self._channel):
	def _closeConnection(self):
		self._sendMessage("QUIT");
		self._socket.shutdown(socket.SHUT_RDWR)
		self._socket.close()
		return True
			if(len(line) >= 2):
				if(line[0] == "PING"):
					self._sendMessage("PONG " + line[1])
 
			# check if the line contains a private message (PRIVMSG)

src/s/f/sftmumblebot-HEAD/MumbleConnection.py   sftmumblebot(Download)
		pbMess.os = platform.system()
		pbMess.os_version = "mumblebot lol"
		if not self._sendMessage(pbMess):
			raise Exception("couldn't send version package", 0)
		# send auth package.
		pbMess = Mumble_pb2.Authenticate()
		pbMess.username = self._nickname
		if self._password != None:
			pbMess.password = self._password
		if not self._sendMessage(pbMess):
		pbMess.message = message
		self._log("sending text message: " + message, 2)
		return self._sendMessage(pbMess)
 
	def _pingLoop(self):
		while self._connected:
			pbMess = Mumble_pb2.Ping()
			if not self._sendMessage(pbMess):
		pbMess.session = self._session
		pbMess.channel_id = cid
		if not self._sendMessage(pbMess):
			self._log("failed to send join package", 1)
			return False

src/s/f/sftmumblebot-HEAD/ConsoleConnection.py   sftmumblebot(Download)
	def _sendTextMessageUnsafe(self, message):
		return self._sendMessage(message)