This file is indexed.

/usr/lib/python2.7/dist-packages/londonlaw/guiclient/ChatPanel.py is in londonlaw 0.2.1-18.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#  London Law -- a networked manhunting board game
#  Copyright (C) 2003-2004 Paul Pelzl
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License, Version 2, as 
#  published by the Free Software Foundation.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA




# ChatPanel.py
#
# This class creates a combined chat entry and chat message display area.

import wx
from ScrolledLabel import *

# Wrapped in a StaticBox.
class ChatPanel(wx.Panel):
   def __init__(self, parent, text, enableSendTo):
      wx.Panel.__init__(self, parent, -1)


      # create a scrollable display for the chat messages 
      self.chatDisplay = ScrolledLabel(self, text)

      # create the "send to" radio button
      self.chatRadio = wx.RadioBox(self, -1, "send to:", wx.DefaultPosition, wx.DefaultSize,
         ["all", "team"], 1, wx.RA_SPECIFY_COLS)
      self.chatRadio.Enable(enableSendTo)

      # create a chat entry box
      self.chatEntry = wx.TextCtrl(self, -1, "", wx.DefaultPosition, wx.DefaultSize, wx.TE_PROCESS_ENTER)
      self.chatEntry.SetMaxLength(254)  # messages longer than this would get truncated by ESocket.write_string()


      # set up the geometry.
      # line the chat display and the radio button horizontally...
      sizer2 = wx.BoxSizer(wx.HORIZONTAL)
      sizer2.Add(self.chatDisplay, 1, wx.EXPAND|wx.ALL, 5)
      sizer2.Add(self.chatRadio, 0, wx.ALIGN_BOTTOM|wx.ALL, 5) 

      # ... and line up the rest vertically
      self.topSizer = wx.BoxSizer(wx.VERTICAL)
      self.topSizer.Add(sizer2, 1, wx.EXPAND)
      self.topSizer.Add(self.chatEntry, 0, wx.EXPAND|wx.ALL, 5)
      self.SetSizer(self.topSizer)
      self.topSizer.SetSizeHints(self)


   def GetEntry(self):
      return (self.chatEntry.GetValue(), self.chatRadio.GetStringSelection())

   def ClearEntry(self):
      self.chatEntry.Clear()

   def SetText(self, txt):
      self.chatDisplay.SetText(txt)

   def AppendText(self, txt):
      self.chatDisplay.AppendText(txt)


# arch-tag: gui chat panel