| View previous topic :: View next topic |
| Author |
Message |
pilouuu Halfop
Joined: 26 Dec 2005 Posts: 82
|
Posted: Sat Jan 13, 2007 7:42 am Post subject: change say bot |
|
|
| Code: | proc gf_fg {nick uhost hand chan text} {
if { [userlist |amnovf $chan] == "" } {
foreach user [userlist B|] {
set usersnick [hand2nick $user]
if { $usersnick == "" } {
putserv "NOTICE $nick :1Nickname: $usersnick"
} else {
putserv "NOTICE $nick :1Nickname: $usersnick"
}
}
putserv "NOTICE $nick :1Fthe end"
}
} |
Hi
the bot say:
nickname: bla
nickname: bla2
nickname: bla3
possible to change for
nickname: bla bla2 bla3
max 5 user by line
thx for help |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sat Jan 13, 2007 1:31 pm Post subject: |
|
|
Indent your code properly next time or I won't even bother opening topics created by you.
Also, this code doesn't make much sense to me, it only executes if there is NO-ONE in the userlist for the channel, and then it proceeds to list an imaginary flag. |
|
| Back to top |
|
 |
pilouuu Halfop
Joined: 26 Dec 2005 Posts: 82
|
Posted: Sun Jan 14, 2007 11:11 am Post subject: |
|
|
| Code: | bind pub -|- "\!list" gf_fg
proc gf_fg {nick uhost hand chan text} {
if { [userlist |amnovf $chan] == "" } {
foreach user [userlist B|] {
set usersnick [hand2nick $user]
if { $usersnick == "" } {
putserv "NOTICE $nick :1Nickname: $usersnick"
} else {
putserv "NOTICE $nick :1Nickname: $usersnick"
}
}
putserv "NOTICE $nick :The end"
}
} |
code complete...
the bot say only list user whit flags B ( expl: Admin or Botlist )
the code functions.
Just change say : <bot> nicklist1
<bot> nicklist2 etc etc
By
<bot> nicklist 1 nicklist 2 nicklist 3 etc etc (5 by line)
thx |
|
| Back to top |
|
 |
pilouuu Halfop
Joined: 26 Dec 2005 Posts: 82
|
Posted: Mon Jan 15, 2007 7:17 pm Post subject: |
|
|
| not possible? :/ |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Mon Jan 15, 2007 7:40 pm Post subject: |
|
|
Your code doesn't make sense and your question has already been answered: http://forum.egghelp.org/viewtopic.php?t=12948
(i miss the post merge button ) _________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon Jan 15, 2007 7:48 pm Post subject: |
|
|
To split it to 5 nicks a line, store the output from the [userlist] to a temporary variable, run a for-loop, and use lrange to extract 5 list items from the variable. Rest would be pretty much like the code in the other thread... _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|