Project

General

Profile

[script] Random Nick Color message » Random Nick Color message v0.1.ini

script v0.1 - Mr. BS, 03/15/2014 02:39 AM

 
1
; http://dev.adiirc.com/boards/5/topics/163
2
; outputs same nick random color for the message
3
; v0.1 by pereba
4

    
5
on 1:START: {
6
  UserConf
7
}
8

    
9
on 1:LOAD: {
10
  UserConf
11
}
12

    
13
on 1:UNLOAD: {
14
  unset %RColor.*
15
}
16

    
17
alias -l UserConf {
18
  set %RColor.nickConfig $strip($readini(config.ini, Messages, prefixuser),c)
19
  set %RColor.actionConfig $strip($readini(config.ini, Messages, prefixemote),c)
20
  set %RColor.Enabled 1
21
  set %RColor.Timestamp.Enabled 1
22
  set %RColor.Action.Enabled 1
23
}
24

    
25
;channel
26
on ^*:TEXT:*:#: {
27
  if ($nick(#, $nick)) AND (%RColor.Enabled == 1) {
28
    echo $TheColor $EchoMode # $nickFormated $1-
29
    halt
30
  }
31
}
32

    
33
;action
34
on ^*:ACTION:*:#: {
35
  if (%RColor.Enabled != 1) { return }
36
  if ($nick(#, $nick)) AND (%RColor.Action.Enabled == 1) {
37
    echo $TheColor $EchoMode # $actionFormated $1-
38
    halt
39
  }
40
}
41

    
42
alias -l TheColor {
43
  if ($nick(#,$nick).color > 0) {
44
    return $nick(#,$nick).color
45
  }
46
}
47

    
48
alias -l EchoMode {
49
  if (%RColor.Timestamp.Enabled == 1) {
50
    return -trlmbf
51
  }
52
  return -rlmbf
53
}
54

    
55
alias actionFormated return $replacex(%RColor.actionConfig,$!pnick,$nick($chan,$nick).pnick)
56
alias nickFormated return $replacex(%RColor.nickConfig,$!pnick,$nick($chan,$nick).pnick)
57

    
58
menu menubar {
59
  -
60
  $iif(%RColor.Enabled == 1, $style(1),) 🎨 RColor Messages
61
  .$iif(%RColor.Enabled == 1, Disable, Enable) : $iif(%RColor.Enabled == 1, unset %RColor.Enabled, set %RColor.Enabled 1)
62
  .$iif(%RColor.Timestamp.Enabled == 1, $style(1),) Use timestamp : $iif(%RColor.Timestamp.Enabled == 1, unset %RColor.Timestamp.Enabled, set %RColor.Timestamp.Enabled 1)
63
  .$iif(%RColor.Action.Enabled == 1, $style(1),) Apply for action : $iif(%RColor.Action.Enabled == 1, unset %RColor.Action.Enabled, set %RColor.Action.Enabled 1)
64
  -
65
}
(2-2/6)